github.com/juju/juju@v0.0.0-20240430160146-1752b71fcf00/apiserver/facade/mocks/facade_mock.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/juju/juju/apiserver/facade (interfaces: Resources,Authorizer)
     3  //
     4  // Generated by this command:
     5  //
     6  //	mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/apiserver/facade Resources,Authorizer
     7  //
     8  
     9  // Package mocks is a generated GoMock package.
    10  package mocks
    11  
    12  import (
    13  	reflect "reflect"
    14  
    15  	facade "github.com/juju/juju/apiserver/facade"
    16  	permission "github.com/juju/juju/core/permission"
    17  	names "github.com/juju/names/v5"
    18  	gomock "go.uber.org/mock/gomock"
    19  )
    20  
    21  // MockResources is a mock of Resources interface.
    22  type MockResources struct {
    23  	ctrl     *gomock.Controller
    24  	recorder *MockResourcesMockRecorder
    25  }
    26  
    27  // MockResourcesMockRecorder is the mock recorder for MockResources.
    28  type MockResourcesMockRecorder struct {
    29  	mock *MockResources
    30  }
    31  
    32  // NewMockResources creates a new mock instance.
    33  func NewMockResources(ctrl *gomock.Controller) *MockResources {
    34  	mock := &MockResources{ctrl: ctrl}
    35  	mock.recorder = &MockResourcesMockRecorder{mock}
    36  	return mock
    37  }
    38  
    39  // EXPECT returns an object that allows the caller to indicate expected use.
    40  func (m *MockResources) EXPECT() *MockResourcesMockRecorder {
    41  	return m.recorder
    42  }
    43  
    44  // Get mocks base method.
    45  func (m *MockResources) Get(arg0 string) facade.Resource {
    46  	m.ctrl.T.Helper()
    47  	ret := m.ctrl.Call(m, "Get", arg0)
    48  	ret0, _ := ret[0].(facade.Resource)
    49  	return ret0
    50  }
    51  
    52  // Get indicates an expected call of Get.
    53  func (mr *MockResourcesMockRecorder) Get(arg0 any) *gomock.Call {
    54  	mr.mock.ctrl.T.Helper()
    55  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockResources)(nil).Get), arg0)
    56  }
    57  
    58  // Register mocks base method.
    59  func (m *MockResources) Register(arg0 facade.Resource) string {
    60  	m.ctrl.T.Helper()
    61  	ret := m.ctrl.Call(m, "Register", arg0)
    62  	ret0, _ := ret[0].(string)
    63  	return ret0
    64  }
    65  
    66  // Register indicates an expected call of Register.
    67  func (mr *MockResourcesMockRecorder) Register(arg0 any) *gomock.Call {
    68  	mr.mock.ctrl.T.Helper()
    69  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockResources)(nil).Register), arg0)
    70  }
    71  
    72  // Stop mocks base method.
    73  func (m *MockResources) Stop(arg0 string) error {
    74  	m.ctrl.T.Helper()
    75  	ret := m.ctrl.Call(m, "Stop", arg0)
    76  	ret0, _ := ret[0].(error)
    77  	return ret0
    78  }
    79  
    80  // Stop indicates an expected call of Stop.
    81  func (mr *MockResourcesMockRecorder) Stop(arg0 any) *gomock.Call {
    82  	mr.mock.ctrl.T.Helper()
    83  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockResources)(nil).Stop), arg0)
    84  }
    85  
    86  // MockAuthorizer is a mock of Authorizer interface.
    87  type MockAuthorizer struct {
    88  	ctrl     *gomock.Controller
    89  	recorder *MockAuthorizerMockRecorder
    90  }
    91  
    92  // MockAuthorizerMockRecorder is the mock recorder for MockAuthorizer.
    93  type MockAuthorizerMockRecorder struct {
    94  	mock *MockAuthorizer
    95  }
    96  
    97  // NewMockAuthorizer creates a new mock instance.
    98  func NewMockAuthorizer(ctrl *gomock.Controller) *MockAuthorizer {
    99  	mock := &MockAuthorizer{ctrl: ctrl}
   100  	mock.recorder = &MockAuthorizerMockRecorder{mock}
   101  	return mock
   102  }
   103  
   104  // EXPECT returns an object that allows the caller to indicate expected use.
   105  func (m *MockAuthorizer) EXPECT() *MockAuthorizerMockRecorder {
   106  	return m.recorder
   107  }
   108  
   109  // AuthApplicationAgent mocks base method.
   110  func (m *MockAuthorizer) AuthApplicationAgent() bool {
   111  	m.ctrl.T.Helper()
   112  	ret := m.ctrl.Call(m, "AuthApplicationAgent")
   113  	ret0, _ := ret[0].(bool)
   114  	return ret0
   115  }
   116  
   117  // AuthApplicationAgent indicates an expected call of AuthApplicationAgent.
   118  func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *gomock.Call {
   119  	mr.mock.ctrl.T.Helper()
   120  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent))
   121  }
   122  
   123  // AuthClient mocks base method.
   124  func (m *MockAuthorizer) AuthClient() bool {
   125  	m.ctrl.T.Helper()
   126  	ret := m.ctrl.Call(m, "AuthClient")
   127  	ret0, _ := ret[0].(bool)
   128  	return ret0
   129  }
   130  
   131  // AuthClient indicates an expected call of AuthClient.
   132  func (mr *MockAuthorizerMockRecorder) AuthClient() *gomock.Call {
   133  	mr.mock.ctrl.T.Helper()
   134  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient))
   135  }
   136  
   137  // AuthController mocks base method.
   138  func (m *MockAuthorizer) AuthController() bool {
   139  	m.ctrl.T.Helper()
   140  	ret := m.ctrl.Call(m, "AuthController")
   141  	ret0, _ := ret[0].(bool)
   142  	return ret0
   143  }
   144  
   145  // AuthController indicates an expected call of AuthController.
   146  func (mr *MockAuthorizerMockRecorder) AuthController() *gomock.Call {
   147  	mr.mock.ctrl.T.Helper()
   148  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController))
   149  }
   150  
   151  // AuthMachineAgent mocks base method.
   152  func (m *MockAuthorizer) AuthMachineAgent() bool {
   153  	m.ctrl.T.Helper()
   154  	ret := m.ctrl.Call(m, "AuthMachineAgent")
   155  	ret0, _ := ret[0].(bool)
   156  	return ret0
   157  }
   158  
   159  // AuthMachineAgent indicates an expected call of AuthMachineAgent.
   160  func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *gomock.Call {
   161  	mr.mock.ctrl.T.Helper()
   162  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent))
   163  }
   164  
   165  // AuthModelAgent mocks base method.
   166  func (m *MockAuthorizer) AuthModelAgent() bool {
   167  	m.ctrl.T.Helper()
   168  	ret := m.ctrl.Call(m, "AuthModelAgent")
   169  	ret0, _ := ret[0].(bool)
   170  	return ret0
   171  }
   172  
   173  // AuthModelAgent indicates an expected call of AuthModelAgent.
   174  func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *gomock.Call {
   175  	mr.mock.ctrl.T.Helper()
   176  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent))
   177  }
   178  
   179  // AuthOwner mocks base method.
   180  func (m *MockAuthorizer) AuthOwner(arg0 names.Tag) bool {
   181  	m.ctrl.T.Helper()
   182  	ret := m.ctrl.Call(m, "AuthOwner", arg0)
   183  	ret0, _ := ret[0].(bool)
   184  	return ret0
   185  }
   186  
   187  // AuthOwner indicates an expected call of AuthOwner.
   188  func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *gomock.Call {
   189  	mr.mock.ctrl.T.Helper()
   190  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0)
   191  }
   192  
   193  // AuthUnitAgent mocks base method.
   194  func (m *MockAuthorizer) AuthUnitAgent() bool {
   195  	m.ctrl.T.Helper()
   196  	ret := m.ctrl.Call(m, "AuthUnitAgent")
   197  	ret0, _ := ret[0].(bool)
   198  	return ret0
   199  }
   200  
   201  // AuthUnitAgent indicates an expected call of AuthUnitAgent.
   202  func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *gomock.Call {
   203  	mr.mock.ctrl.T.Helper()
   204  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent))
   205  }
   206  
   207  // ConnectedModel mocks base method.
   208  func (m *MockAuthorizer) ConnectedModel() string {
   209  	m.ctrl.T.Helper()
   210  	ret := m.ctrl.Call(m, "ConnectedModel")
   211  	ret0, _ := ret[0].(string)
   212  	return ret0
   213  }
   214  
   215  // ConnectedModel indicates an expected call of ConnectedModel.
   216  func (mr *MockAuthorizerMockRecorder) ConnectedModel() *gomock.Call {
   217  	mr.mock.ctrl.T.Helper()
   218  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel))
   219  }
   220  
   221  // EntityHasPermission mocks base method.
   222  func (m *MockAuthorizer) EntityHasPermission(arg0 names.Tag, arg1 permission.Access, arg2 names.Tag) error {
   223  	m.ctrl.T.Helper()
   224  	ret := m.ctrl.Call(m, "EntityHasPermission", arg0, arg1, arg2)
   225  	ret0, _ := ret[0].(error)
   226  	return ret0
   227  }
   228  
   229  // EntityHasPermission indicates an expected call of EntityHasPermission.
   230  func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *gomock.Call {
   231  	mr.mock.ctrl.T.Helper()
   232  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2)
   233  }
   234  
   235  // GetAuthTag mocks base method.
   236  func (m *MockAuthorizer) GetAuthTag() names.Tag {
   237  	m.ctrl.T.Helper()
   238  	ret := m.ctrl.Call(m, "GetAuthTag")
   239  	ret0, _ := ret[0].(names.Tag)
   240  	return ret0
   241  }
   242  
   243  // GetAuthTag indicates an expected call of GetAuthTag.
   244  func (mr *MockAuthorizerMockRecorder) GetAuthTag() *gomock.Call {
   245  	mr.mock.ctrl.T.Helper()
   246  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag))
   247  }
   248  
   249  // HasPermission mocks base method.
   250  func (m *MockAuthorizer) HasPermission(arg0 permission.Access, arg1 names.Tag) error {
   251  	m.ctrl.T.Helper()
   252  	ret := m.ctrl.Call(m, "HasPermission", arg0, arg1)
   253  	ret0, _ := ret[0].(error)
   254  	return ret0
   255  }
   256  
   257  // HasPermission indicates an expected call of HasPermission.
   258  func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *gomock.Call {
   259  	mr.mock.ctrl.T.Helper()
   260  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1)
   261  }