trpc.group/trpc-go/trpc-go@v1.0.3/http/mockhttp/http_mock.go (about)

     1  //
     2  //
     3  // Tencent is pleased to support the open source community by making tRPC available.
     4  //
     5  // Copyright (C) 2023 THL A29 Limited, a Tencent company.
     6  // All rights reserved.
     7  //
     8  // If you have downloaded a copy of the tRPC source code from Tencent,
     9  // please note that tRPC source code is licensed under the  Apache 2.0 License,
    10  // A copy of the Apache 2.0 License is included in this file.
    11  //
    12  //
    13  
    14  // Code generated by MockGen. DO NOT EDIT.
    15  // Source: client.go
    16  
    17  // Package mockhttp is a generated GoMock package.
    18  package mockhttp
    19  
    20  import (
    21  	context "context"
    22  	reflect "reflect"
    23  
    24  	gomock "github.com/golang/mock/gomock"
    25  	client "trpc.group/trpc-go/trpc-go/client"
    26  )
    27  
    28  // MockClient is a mock of Client interface
    29  type MockClient struct {
    30  	ctrl     *gomock.Controller
    31  	recorder *MockClientMockRecorder
    32  }
    33  
    34  // MockClientMockRecorder is the mock recorder for MockClient
    35  type MockClientMockRecorder struct {
    36  	mock *MockClient
    37  }
    38  
    39  // NewMockClient creates a new mock instance
    40  func NewMockClient(ctrl *gomock.Controller) *MockClient {
    41  	mock := &MockClient{ctrl: ctrl}
    42  	mock.recorder = &MockClientMockRecorder{mock}
    43  	return mock
    44  }
    45  
    46  // EXPECT returns an object that allows the caller to indicate expected use
    47  func (m *MockClient) EXPECT() *MockClientMockRecorder {
    48  	return m.recorder
    49  }
    50  
    51  // Get mocks base method
    52  func (m *MockClient) Get(ctx context.Context, path string, rspBody interface{}, opts ...client.Option) error {
    53  	m.ctrl.T.Helper()
    54  	varargs := []interface{}{ctx, path, rspBody}
    55  	for _, a := range opts {
    56  		varargs = append(varargs, a)
    57  	}
    58  	ret := m.ctrl.Call(m, "Get", varargs...)
    59  	ret0, _ := ret[0].(error)
    60  	return ret0
    61  }
    62  
    63  // Get indicates an expected call of Get
    64  func (mr *MockClientMockRecorder) Get(ctx, path, rspBody interface{}, opts ...interface{}) *gomock.Call {
    65  	mr.mock.ctrl.T.Helper()
    66  	varargs := append([]interface{}{ctx, path, rspBody}, opts...)
    67  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockClient)(nil).Get), varargs...)
    68  }
    69  
    70  // Post mocks base method
    71  func (m *MockClient) Post(ctx context.Context, path string, reqBody, rspBody interface{}, opts ...client.Option) error {
    72  	m.ctrl.T.Helper()
    73  	varargs := []interface{}{ctx, path, reqBody, rspBody}
    74  	for _, a := range opts {
    75  		varargs = append(varargs, a)
    76  	}
    77  	ret := m.ctrl.Call(m, "Post", varargs...)
    78  	ret0, _ := ret[0].(error)
    79  	return ret0
    80  }
    81  
    82  // Post indicates an expected call of Post
    83  func (mr *MockClientMockRecorder) Post(ctx, path, reqBody, rspBody interface{}, opts ...interface{}) *gomock.Call {
    84  	mr.mock.ctrl.T.Helper()
    85  	varargs := append([]interface{}{ctx, path, reqBody, rspBody}, opts...)
    86  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Post", reflect.TypeOf((*MockClient)(nil).Post), varargs...)
    87  }
    88  
    89  // Put mocks base method
    90  func (m *MockClient) Put(ctx context.Context, path string, reqBody, rspBody interface{}, opts ...client.Option) error {
    91  	m.ctrl.T.Helper()
    92  	varargs := []interface{}{ctx, path, reqBody, rspBody}
    93  	for _, a := range opts {
    94  		varargs = append(varargs, a)
    95  	}
    96  	ret := m.ctrl.Call(m, "Put", varargs...)
    97  	ret0, _ := ret[0].(error)
    98  	return ret0
    99  }
   100  
   101  // Put indicates an expected call of Put
   102  func (mr *MockClientMockRecorder) Put(ctx, path, reqBody, rspBody interface{}, opts ...interface{}) *gomock.Call {
   103  	mr.mock.ctrl.T.Helper()
   104  	varargs := append([]interface{}{ctx, path, reqBody, rspBody}, opts...)
   105  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockClient)(nil).Put), varargs...)
   106  }
   107  
   108  // Patch mocks base method
   109  func (m *MockClient) Patch(ctx context.Context, path string, reqBody, rspBody interface{}, opts ...client.Option) error {
   110  	m.ctrl.T.Helper()
   111  	varargs := []interface{}{ctx, path, reqBody, rspBody}
   112  	for _, a := range opts {
   113  		varargs = append(varargs, a)
   114  	}
   115  	ret := m.ctrl.Call(m, "Patch", varargs...)
   116  	ret0, _ := ret[0].(error)
   117  	return ret0
   118  }
   119  
   120  // Patch indicates an expected call of Patch
   121  func (mr *MockClientMockRecorder) Patch(ctx, path, reqBody, rspBody interface{}, opts ...interface{}) *gomock.Call {
   122  	mr.mock.ctrl.T.Helper()
   123  	varargs := append([]interface{}{ctx, path, reqBody, rspBody}, opts...)
   124  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockClient)(nil).Patch), varargs...)
   125  }
   126  
   127  // Delete mocks base method
   128  func (m *MockClient) Delete(ctx context.Context, path string, reqBody, rspBody interface{}, opts ...client.Option) error {
   129  	m.ctrl.T.Helper()
   130  	varargs := []interface{}{ctx, path, reqBody, rspBody}
   131  	for _, a := range opts {
   132  		varargs = append(varargs, a)
   133  	}
   134  	ret := m.ctrl.Call(m, "Delete", varargs...)
   135  	ret0, _ := ret[0].(error)
   136  	return ret0
   137  }
   138  
   139  // Delete indicates an expected call of Delete
   140  func (mr *MockClientMockRecorder) Delete(ctx, path, reqBody, rspBody interface{}, opts ...interface{}) *gomock.Call {
   141  	mr.mock.ctrl.T.Helper()
   142  	varargs := append([]interface{}{ctx, path, reqBody, rspBody}, opts...)
   143  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockClient)(nil).Delete), varargs...)
   144  }