Documentation ¶
Overview ¶
Package keymanager is a generated GoMock package.
Package keymanager is a generated GoMock package.
Index ¶
- func Register(registry facade.FacadeRegistry)
- type BlockChecker
- type KeyManagerAPI
- func (api *KeyManagerAPI) AddKeys(ctx context.Context, arg params.ModifyUserSSHKeys) (params.ErrorResults, error)
- func (api *KeyManagerAPI) DeleteKeys(ctx context.Context, arg params.ModifyUserSSHKeys) (params.ErrorResults, error)
- func (api *KeyManagerAPI) ImportKeys(ctx context.Context, arg params.ModifyUserSSHKeys) (params.ErrorResults, error)
- func (api *KeyManagerAPI) ListKeys(ctx context.Context, arg params.ListSSHKeys) (params.StringsResults, error)
- type KeyManagerService
- type MockBlockChecker
- type MockBlockCheckerChangeAllowedCall
- func (c *MockBlockCheckerChangeAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerChangeAllowedCall
- func (c *MockBlockCheckerChangeAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerChangeAllowedCall
- func (c *MockBlockCheckerChangeAllowedCall) Return(arg0 error) *MockBlockCheckerChangeAllowedCall
- type MockBlockCheckerMockRecorder
- type MockBlockCheckerRemoveAllowedCall
- func (c *MockBlockCheckerRemoveAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerRemoveAllowedCall
- func (c *MockBlockCheckerRemoveAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerRemoveAllowedCall
- func (c *MockBlockCheckerRemoveAllowedCall) Return(arg0 error) *MockBlockCheckerRemoveAllowedCall
- type MockKeyManagerService
- func (m *MockKeyManagerService) AddPublicKeysForUser(arg0 context.Context, arg1 user.UUID, arg2 ...string) error
- func (m *MockKeyManagerService) DeleteKeysForUser(arg0 context.Context, arg1 user.UUID, arg2 ...string) error
- func (m *MockKeyManagerService) EXPECT() *MockKeyManagerServiceMockRecorder
- func (m *MockKeyManagerService) ImportPublicKeysForUser(arg0 context.Context, arg1 user.UUID, arg2 *url.URL) error
- func (m *MockKeyManagerService) ListPublicKeysForUser(arg0 context.Context, arg1 user.UUID) ([]ssh.PublicKey, error)
- type MockKeyManagerServiceAddPublicKeysForUserCall
- func (c *MockKeyManagerServiceAddPublicKeysForUserCall) Do(f func(context.Context, user.UUID, ...string) error) *MockKeyManagerServiceAddPublicKeysForUserCall
- func (c *MockKeyManagerServiceAddPublicKeysForUserCall) DoAndReturn(f func(context.Context, user.UUID, ...string) error) *MockKeyManagerServiceAddPublicKeysForUserCall
- func (c *MockKeyManagerServiceAddPublicKeysForUserCall) Return(arg0 error) *MockKeyManagerServiceAddPublicKeysForUserCall
- type MockKeyManagerServiceDeleteKeysForUserCall
- func (c *MockKeyManagerServiceDeleteKeysForUserCall) Do(f func(context.Context, user.UUID, ...string) error) *MockKeyManagerServiceDeleteKeysForUserCall
- func (c *MockKeyManagerServiceDeleteKeysForUserCall) DoAndReturn(f func(context.Context, user.UUID, ...string) error) *MockKeyManagerServiceDeleteKeysForUserCall
- func (c *MockKeyManagerServiceDeleteKeysForUserCall) Return(arg0 error) *MockKeyManagerServiceDeleteKeysForUserCall
- type MockKeyManagerServiceImportPublicKeysForUserCall
- func (c *MockKeyManagerServiceImportPublicKeysForUserCall) Do(f func(context.Context, user.UUID, *url.URL) error) *MockKeyManagerServiceImportPublicKeysForUserCall
- func (c *MockKeyManagerServiceImportPublicKeysForUserCall) DoAndReturn(f func(context.Context, user.UUID, *url.URL) error) *MockKeyManagerServiceImportPublicKeysForUserCall
- func (c *MockKeyManagerServiceImportPublicKeysForUserCall) Return(arg0 error) *MockKeyManagerServiceImportPublicKeysForUserCall
- type MockKeyManagerServiceListPublicKeysForUserCall
- func (c *MockKeyManagerServiceListPublicKeysForUserCall) Do(f func(context.Context, user.UUID) ([]ssh.PublicKey, error)) *MockKeyManagerServiceListPublicKeysForUserCall
- func (c *MockKeyManagerServiceListPublicKeysForUserCall) DoAndReturn(f func(context.Context, user.UUID) ([]ssh.PublicKey, error)) *MockKeyManagerServiceListPublicKeysForUserCall
- func (c *MockKeyManagerServiceListPublicKeysForUserCall) Return(arg0 []ssh.PublicKey, arg1 error) *MockKeyManagerServiceListPublicKeysForUserCall
- type MockKeyManagerServiceMockRecorder
- func (mr *MockKeyManagerServiceMockRecorder) AddPublicKeysForUser(arg0, arg1 any, arg2 ...any) *MockKeyManagerServiceAddPublicKeysForUserCall
- func (mr *MockKeyManagerServiceMockRecorder) DeleteKeysForUser(arg0, arg1 any, arg2 ...any) *MockKeyManagerServiceDeleteKeysForUserCall
- func (mr *MockKeyManagerServiceMockRecorder) ImportPublicKeysForUser(arg0, arg1, arg2 any) *MockKeyManagerServiceImportPublicKeysForUserCall
- func (mr *MockKeyManagerServiceMockRecorder) ListPublicKeysForUser(arg0, arg1 any) *MockKeyManagerServiceListPublicKeysForUserCall
- type MockUserService
- type MockUserServiceGetUserByNameCall
- func (c *MockUserServiceGetUserByNameCall) Do(f func(context.Context, user.Name) (user.User, error)) *MockUserServiceGetUserByNameCall
- func (c *MockUserServiceGetUserByNameCall) DoAndReturn(f func(context.Context, user.Name) (user.User, error)) *MockUserServiceGetUserByNameCall
- func (c *MockUserServiceGetUserByNameCall) Return(arg0 user.User, arg1 error) *MockUserServiceGetUserByNameCall
- type MockUserServiceMockRecorder
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type BlockChecker ¶
type KeyManagerAPI ¶
type KeyManagerAPI struct {
// contains filtered or unexported fields
}
KeyManagerAPI provides api endpoints for manipulating ssh keys
func (*KeyManagerAPI) AddKeys ¶
func (api *KeyManagerAPI) AddKeys( ctx context.Context, arg params.ModifyUserSSHKeys, ) (params.ErrorResults, error)
AddKeys adds new authorised ssh keys for the specified user.
func (*KeyManagerAPI) DeleteKeys ¶
func (api *KeyManagerAPI) DeleteKeys(ctx context.Context, arg params.ModifyUserSSHKeys) (params.ErrorResults, error)
DeleteKeys deletes the authorised ssh keys for the specified user.
func (*KeyManagerAPI) ImportKeys ¶
func (api *KeyManagerAPI) ImportKeys(ctx context.Context, arg params.ModifyUserSSHKeys) (params.ErrorResults, error)
ImportKeys imports new authorised ssh keys from the specified key ids for the specified user.
func (*KeyManagerAPI) ListKeys ¶
func (api *KeyManagerAPI) ListKeys( ctx context.Context, arg params.ListSSHKeys, ) (params.StringsResults, error)
ListKeys returns the authorised ssh keys for the specified users.
type KeyManagerService ¶
type KeyManagerService interface { // AddPublicKeysForUser is responsible for adding one or more new public // keys for a user to the current model. AddPublicKeysForUser(context.Context, user.UUID, ...string) error // DeleteKeysForUser is responsible removing one ore more keys from a user // within this model. Keys are identified by either the comment, // public key data or the fingerprint. DeleteKeysForUser(context.Context, user.UUID, ...string) error // ImportPublicKeysForUser is responsible for importing keys against a Juju // user for the current model from a third party source identified in the // url. ImportPublicKeysForUser(context.Context, user.UUID, *url.URL) error // ListPublicKeysForUser is responsible returning all of the public keys // for a user within the current model. ListPublicKeysForUser(context.Context, user.UUID) ([]coressh.PublicKey, error) }
KeyManagerService is the interface for the service this facade requires to perform crud operations on a users public ssh keys within a model.
type MockBlockChecker ¶
type MockBlockChecker struct {
// contains filtered or unexported fields
}
MockBlockChecker is a mock of BlockChecker interface.
func NewMockBlockChecker ¶
func NewMockBlockChecker(ctrl *gomock.Controller) *MockBlockChecker
NewMockBlockChecker creates a new mock instance.
func (*MockBlockChecker) ChangeAllowed ¶
func (m *MockBlockChecker) ChangeAllowed(arg0 context.Context) error
ChangeAllowed mocks base method.
func (*MockBlockChecker) EXPECT ¶
func (m *MockBlockChecker) EXPECT() *MockBlockCheckerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBlockChecker) RemoveAllowed ¶
func (m *MockBlockChecker) RemoveAllowed(arg0 context.Context) error
RemoveAllowed mocks base method.
type MockBlockCheckerChangeAllowedCall ¶
MockBlockCheckerChangeAllowedCall wrap *gomock.Call
func (*MockBlockCheckerChangeAllowedCall) Do ¶
func (c *MockBlockCheckerChangeAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerChangeAllowedCall
Do rewrite *gomock.Call.Do
func (*MockBlockCheckerChangeAllowedCall) DoAndReturn ¶
func (c *MockBlockCheckerChangeAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerChangeAllowedCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockBlockCheckerChangeAllowedCall) Return ¶
func (c *MockBlockCheckerChangeAllowedCall) Return(arg0 error) *MockBlockCheckerChangeAllowedCall
Return rewrite *gomock.Call.Return
type MockBlockCheckerMockRecorder ¶
type MockBlockCheckerMockRecorder struct {
// contains filtered or unexported fields
}
MockBlockCheckerMockRecorder is the mock recorder for MockBlockChecker.
func (*MockBlockCheckerMockRecorder) ChangeAllowed ¶
func (mr *MockBlockCheckerMockRecorder) ChangeAllowed(arg0 any) *MockBlockCheckerChangeAllowedCall
ChangeAllowed indicates an expected call of ChangeAllowed.
func (*MockBlockCheckerMockRecorder) RemoveAllowed ¶
func (mr *MockBlockCheckerMockRecorder) RemoveAllowed(arg0 any) *MockBlockCheckerRemoveAllowedCall
RemoveAllowed indicates an expected call of RemoveAllowed.
type MockBlockCheckerRemoveAllowedCall ¶
MockBlockCheckerRemoveAllowedCall wrap *gomock.Call
func (*MockBlockCheckerRemoveAllowedCall) Do ¶
func (c *MockBlockCheckerRemoveAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerRemoveAllowedCall
Do rewrite *gomock.Call.Do
func (*MockBlockCheckerRemoveAllowedCall) DoAndReturn ¶
func (c *MockBlockCheckerRemoveAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerRemoveAllowedCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockBlockCheckerRemoveAllowedCall) Return ¶
func (c *MockBlockCheckerRemoveAllowedCall) Return(arg0 error) *MockBlockCheckerRemoveAllowedCall
Return rewrite *gomock.Call.Return
type MockKeyManagerService ¶
type MockKeyManagerService struct {
// contains filtered or unexported fields
}
MockKeyManagerService is a mock of KeyManagerService interface.
func NewMockKeyManagerService ¶
func NewMockKeyManagerService(ctrl *gomock.Controller) *MockKeyManagerService
NewMockKeyManagerService creates a new mock instance.
func (*MockKeyManagerService) AddPublicKeysForUser ¶
func (m *MockKeyManagerService) AddPublicKeysForUser(arg0 context.Context, arg1 user.UUID, arg2 ...string) error
AddPublicKeysForUser mocks base method.
func (*MockKeyManagerService) DeleteKeysForUser ¶
func (m *MockKeyManagerService) DeleteKeysForUser(arg0 context.Context, arg1 user.UUID, arg2 ...string) error
DeleteKeysForUser mocks base method.
func (*MockKeyManagerService) EXPECT ¶
func (m *MockKeyManagerService) EXPECT() *MockKeyManagerServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockKeyManagerService) ImportPublicKeysForUser ¶
func (m *MockKeyManagerService) ImportPublicKeysForUser(arg0 context.Context, arg1 user.UUID, arg2 *url.URL) error
ImportPublicKeysForUser mocks base method.
func (*MockKeyManagerService) ListPublicKeysForUser ¶
func (m *MockKeyManagerService) ListPublicKeysForUser(arg0 context.Context, arg1 user.UUID) ([]ssh.PublicKey, error)
ListPublicKeysForUser mocks base method.
type MockKeyManagerServiceAddPublicKeysForUserCall ¶
MockKeyManagerServiceAddPublicKeysForUserCall wrap *gomock.Call
func (*MockKeyManagerServiceAddPublicKeysForUserCall) Do ¶
func (c *MockKeyManagerServiceAddPublicKeysForUserCall) Do(f func(context.Context, user.UUID, ...string) error) *MockKeyManagerServiceAddPublicKeysForUserCall
Do rewrite *gomock.Call.Do
func (*MockKeyManagerServiceAddPublicKeysForUserCall) DoAndReturn ¶
func (c *MockKeyManagerServiceAddPublicKeysForUserCall) DoAndReturn(f func(context.Context, user.UUID, ...string) error) *MockKeyManagerServiceAddPublicKeysForUserCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockKeyManagerServiceAddPublicKeysForUserCall) Return ¶
func (c *MockKeyManagerServiceAddPublicKeysForUserCall) Return(arg0 error) *MockKeyManagerServiceAddPublicKeysForUserCall
Return rewrite *gomock.Call.Return
type MockKeyManagerServiceDeleteKeysForUserCall ¶
MockKeyManagerServiceDeleteKeysForUserCall wrap *gomock.Call
func (*MockKeyManagerServiceDeleteKeysForUserCall) Do ¶
func (c *MockKeyManagerServiceDeleteKeysForUserCall) Do(f func(context.Context, user.UUID, ...string) error) *MockKeyManagerServiceDeleteKeysForUserCall
Do rewrite *gomock.Call.Do
func (*MockKeyManagerServiceDeleteKeysForUserCall) DoAndReturn ¶
func (c *MockKeyManagerServiceDeleteKeysForUserCall) DoAndReturn(f func(context.Context, user.UUID, ...string) error) *MockKeyManagerServiceDeleteKeysForUserCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockKeyManagerServiceDeleteKeysForUserCall) Return ¶
func (c *MockKeyManagerServiceDeleteKeysForUserCall) Return(arg0 error) *MockKeyManagerServiceDeleteKeysForUserCall
Return rewrite *gomock.Call.Return
type MockKeyManagerServiceImportPublicKeysForUserCall ¶
MockKeyManagerServiceImportPublicKeysForUserCall wrap *gomock.Call
func (*MockKeyManagerServiceImportPublicKeysForUserCall) Do ¶
func (c *MockKeyManagerServiceImportPublicKeysForUserCall) Do(f func(context.Context, user.UUID, *url.URL) error) *MockKeyManagerServiceImportPublicKeysForUserCall
Do rewrite *gomock.Call.Do
func (*MockKeyManagerServiceImportPublicKeysForUserCall) DoAndReturn ¶
func (c *MockKeyManagerServiceImportPublicKeysForUserCall) DoAndReturn(f func(context.Context, user.UUID, *url.URL) error) *MockKeyManagerServiceImportPublicKeysForUserCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockKeyManagerServiceImportPublicKeysForUserCall) Return ¶
func (c *MockKeyManagerServiceImportPublicKeysForUserCall) Return(arg0 error) *MockKeyManagerServiceImportPublicKeysForUserCall
Return rewrite *gomock.Call.Return
type MockKeyManagerServiceListPublicKeysForUserCall ¶
MockKeyManagerServiceListPublicKeysForUserCall wrap *gomock.Call
func (*MockKeyManagerServiceListPublicKeysForUserCall) Do ¶
func (c *MockKeyManagerServiceListPublicKeysForUserCall) Do(f func(context.Context, user.UUID) ([]ssh.PublicKey, error)) *MockKeyManagerServiceListPublicKeysForUserCall
Do rewrite *gomock.Call.Do
func (*MockKeyManagerServiceListPublicKeysForUserCall) DoAndReturn ¶
func (c *MockKeyManagerServiceListPublicKeysForUserCall) DoAndReturn(f func(context.Context, user.UUID) ([]ssh.PublicKey, error)) *MockKeyManagerServiceListPublicKeysForUserCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockKeyManagerServiceListPublicKeysForUserCall) Return ¶
func (c *MockKeyManagerServiceListPublicKeysForUserCall) Return(arg0 []ssh.PublicKey, arg1 error) *MockKeyManagerServiceListPublicKeysForUserCall
Return rewrite *gomock.Call.Return
type MockKeyManagerServiceMockRecorder ¶
type MockKeyManagerServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockKeyManagerServiceMockRecorder is the mock recorder for MockKeyManagerService.
func (*MockKeyManagerServiceMockRecorder) AddPublicKeysForUser ¶
func (mr *MockKeyManagerServiceMockRecorder) AddPublicKeysForUser(arg0, arg1 any, arg2 ...any) *MockKeyManagerServiceAddPublicKeysForUserCall
AddPublicKeysForUser indicates an expected call of AddPublicKeysForUser.
func (*MockKeyManagerServiceMockRecorder) DeleteKeysForUser ¶
func (mr *MockKeyManagerServiceMockRecorder) DeleteKeysForUser(arg0, arg1 any, arg2 ...any) *MockKeyManagerServiceDeleteKeysForUserCall
DeleteKeysForUser indicates an expected call of DeleteKeysForUser.
func (*MockKeyManagerServiceMockRecorder) ImportPublicKeysForUser ¶
func (mr *MockKeyManagerServiceMockRecorder) ImportPublicKeysForUser(arg0, arg1, arg2 any) *MockKeyManagerServiceImportPublicKeysForUserCall
ImportPublicKeysForUser indicates an expected call of ImportPublicKeysForUser.
func (*MockKeyManagerServiceMockRecorder) ListPublicKeysForUser ¶
func (mr *MockKeyManagerServiceMockRecorder) ListPublicKeysForUser(arg0, arg1 any) *MockKeyManagerServiceListPublicKeysForUserCall
ListPublicKeysForUser indicates an expected call of ListPublicKeysForUser.
type MockUserService ¶
type MockUserService struct {
// contains filtered or unexported fields
}
MockUserService is a mock of UserService interface.
func NewMockUserService ¶
func NewMockUserService(ctrl *gomock.Controller) *MockUserService
NewMockUserService creates a new mock instance.
func (*MockUserService) EXPECT ¶
func (m *MockUserService) EXPECT() *MockUserServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockUserService) GetUserByName ¶
GetUserByName mocks base method.
type MockUserServiceGetUserByNameCall ¶
MockUserServiceGetUserByNameCall wrap *gomock.Call
func (*MockUserServiceGetUserByNameCall) Do ¶
func (c *MockUserServiceGetUserByNameCall) Do(f func(context.Context, user.Name) (user.User, error)) *MockUserServiceGetUserByNameCall
Do rewrite *gomock.Call.Do
func (*MockUserServiceGetUserByNameCall) DoAndReturn ¶
func (c *MockUserServiceGetUserByNameCall) DoAndReturn(f func(context.Context, user.Name) (user.User, error)) *MockUserServiceGetUserByNameCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockUserServiceGetUserByNameCall) Return ¶
func (c *MockUserServiceGetUserByNameCall) Return(arg0 user.User, arg1 error) *MockUserServiceGetUserByNameCall
Return rewrite *gomock.Call.Return
type MockUserServiceMockRecorder ¶
type MockUserServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockUserServiceMockRecorder is the mock recorder for MockUserService.
func (*MockUserServiceMockRecorder) GetUserByName ¶
func (mr *MockUserServiceMockRecorder) GetUserByName(arg0, arg1 any) *MockUserServiceGetUserByNameCall
GetUserByName indicates an expected call of GetUserByName.
type UserService ¶
type UserService interface { // GetUserByName find thes the Juju identified by their username and returns // the internal user representation matching that username. GetUserByName(context.Context, user.Name) (user.User, error) }
UserService is the interface for the service this facade requires to lookup users by their username in exchange for the internal information we know about