Documentation ¶
Overview ¶
Package fakeclient provides mock implementations of the client to be used for testing.
Index ¶
- type AccessRuleService
- func (s *AccessRuleService) Delete(path string, accountName string) error
- func (s *AccessRuleService) Get(path string, accountName string) (*api.AccessRule, error)
- func (s *AccessRuleService) Iterator(path string, _ *secrethub.AccessRuleIteratorParams) secrethub.AccessRuleIterator
- func (s *AccessRuleService) LevelIterator(path string, _ *secrethub.AccessLevelIteratorParams) secrethub.AccessLevelIterator
- func (s *AccessRuleService) List(path string, depth int, ancestors bool) ([]*api.AccessRule, error)
- func (s *AccessRuleService) ListLevels(path string) ([]*api.AccessLevel, error)
- func (s *AccessRuleService) Set(path string, permission string, accountName string) (*api.AccessRule, error)
- type AccountService
- type AuditEventIterator
- type Client
- func (c Client) AccessRules() secrethub.AccessRuleService
- func (c Client) Accounts() secrethub.AccountService
- func (c Client) Credentials() secrethub.CredentialService
- func (c Client) Dirs() secrethub.DirService
- func (c Client) IDPLinks() secrethub.IDPLinkService
- func (c Client) Me() secrethub.MeService
- func (c Client) Orgs() secrethub.OrgService
- func (c Client) Repos() secrethub.RepoService
- func (c Client) Secrets() secrethub.SecretService
- func (c Client) Services() secrethub.ServiceService
- func (c Client) Users() secrethub.UserService
- type CredentialIterator
- type CredentialService
- type DirService
- type IDPLinkGCPService
- func (i IDPLinkGCPService) AuthorizationCodeListener(namespace string, projectID string) (oauthorizer.CallbackHandler, error)
- func (i IDPLinkGCPService) Create(namespace string, projectID string, authorizationCode, redirectURI string) (*api.IdentityProviderLink, error)
- func (i IDPLinkGCPService) Delete(namespace string, projectID string) error
- func (i IDPLinkGCPService) Exists(namespace string, projectID string) (bool, error)
- func (i IDPLinkGCPService) Get(namespace string, projectID string) (*api.IdentityProviderLink, error)
- func (i IDPLinkGCPService) List(namespace string, params *secrethub.IdpLinkIteratorParams) secrethub.IdpLinkIterator
- type IDPLinkIterator
- type IDPLinkService
- type MeService
- type OrgMemberService
- func (s *OrgMemberService) Get(org string, username string) (*api.OrgMember, error)
- func (s *OrgMemberService) Invite(org string, username string, role string) (*api.OrgMember, error)
- func (s *OrgMemberService) Iterator(org string, params *secrethub.OrgMemberIteratorParams) secrethub.OrgMemberIterator
- func (s *OrgMemberService) List(org string) ([]*api.OrgMember, error)
- func (s *OrgMemberService) Revoke(org string, username string, opts *api.RevokeOpts) (*api.RevokeOrgResponse, error)
- func (s *OrgMemberService) Update(org string, username string, role string) (*api.OrgMember, error)
- type OrgService
- func (s *OrgService) Create(name string, description string) (*api.Org, error)
- func (s *OrgService) Delete(name string) error
- func (s *OrgService) Get(name string) (*api.Org, error)
- func (s *OrgService) Iterator(params *secrethub.OrgIteratorParams) secrethub.OrgIterator
- func (s *OrgService) ListMine() ([]*api.Org, error)
- func (s *OrgService) Members() secrethub.OrgMemberService
- type RepoService
- func (s *RepoService) Create(path string) (*api.Repo, error)
- func (s *RepoService) Delete(path string) error
- func (s *RepoService) EventIterator(path string, config *secrethub.AuditEventIteratorParams) secrethub.AuditEventIterator
- func (s *RepoService) Get(path string) (*api.Repo, error)
- func (s *RepoService) List(namespace string) ([]*api.Repo, error)
- func (s *RepoService) ListAccounts(path string) ([]*api.Account, error)
- func (s *RepoService) ListEvents(path string, subjectTypes api.AuditSubjectTypeList) ([]*api.Audit, error)
- func (s *RepoService) ListMine() ([]*api.Repo, error)
- func (s *RepoService) Services() secrethub.RepoServiceService
- func (s *RepoService) Users() secrethub.RepoUserService
- type RepoServiceService
- type RepoUserService
- func (s *RepoUserService) Invite(path string, username string) (*api.RepoMember, error)
- func (s *RepoUserService) Iterator(path string, params *secrethub.UserIteratorParams) secrethub.UserIterator
- func (s *RepoUserService) List(path string) ([]*api.User, error)
- func (s *RepoUserService) Revoke(path string, username string) (*api.RevokeRepoResponse, error)
- type SecretDeleter
- type SecretEventLister
- type SecretGetter
- type SecretReader
- type SecretService
- func (s *SecretService) Delete(path string) error
- func (s *SecretService) EventIterator(path string, config *secrethub.AuditEventIteratorParams) secrethub.AuditEventIterator
- func (s *SecretService) Exists(path string) (bool, error)
- func (s *SecretService) Get(path string) (*api.Secret, error)
- func (s *SecretService) ListEvents(path string, subjectTypes api.AuditSubjectTypeList) ([]*api.Audit, error)
- func (s *SecretService) Read(path string) (*api.SecretVersion, error)
- func (s *SecretService) ReadString(path string) (string, error)
- func (s *SecretService) Versions() secrethub.SecretVersionService
- func (s *SecretService) Write(path string, data []byte) (*api.SecretVersion, error)
- type SecretVersionService
- func (s *SecretVersionService) Delete(path string) error
- func (s *SecretVersionService) GetWithData(path string) (*api.SecretVersion, error)
- func (s *SecretVersionService) GetWithoutData(path string) (*api.SecretVersion, error)
- func (s *SecretVersionService) Iterator(path string, params *secrethub.SecretVersionIteratorParams) secrethub.SecretVersionIterator
- func (s *SecretVersionService) ListWithData(path string) ([]*api.SecretVersion, error)
- func (s *SecretVersionService) ListWithoutData(path string) ([]*api.SecretVersion, error)
- type ServiceAWSService
- type ServiceService
- func (s *ServiceService) Create(path string, description string, credentialCreator credentials.Creator) (*api.Service, error)
- func (s *ServiceService) Delete(id string) (*api.RevokeRepoResponse, error)
- func (s *ServiceService) Get(id string) (*api.Service, error)
- func (s *ServiceService) Iterator(path string, _ *secrethub.ServiceIteratorParams) secrethub.ServiceIterator
- func (s *ServiceService) List(path string) ([]*api.Service, error)
- type UserService
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessRuleService ¶
type AccessRuleService struct { DeleteFunc func(path string, accountName string) error GetFunc func(path string, accountName string) (*api.AccessRule, error) ListLevelsFunc func(path string) ([]*api.AccessLevel, error) ListFunc func(path string, depth int, ancestors bool) ([]*api.AccessRule, error) SetFunc func(path string, permission string, accountName string) (*api.AccessRule, error) IteratorFunc func() secrethub.AccessRuleIterator LevelIteratorFunc func() secrethub.AccessLevelIterator }
AccessRuleService is a mock of the AccessRuleService interface.
func (*AccessRuleService) Delete ¶
func (s *AccessRuleService) Delete(path string, accountName string) error
Delete implements the AccessRuleService interface Delete function.
func (*AccessRuleService) Get ¶
func (s *AccessRuleService) Get(path string, accountName string) (*api.AccessRule, error)
Get implements the AccessRuleService interface Get function.
func (*AccessRuleService) Iterator ¶
func (s *AccessRuleService) Iterator(path string, _ *secrethub.AccessRuleIteratorParams) secrethub.AccessRuleIterator
func (*AccessRuleService) LevelIterator ¶
func (s *AccessRuleService) LevelIterator(path string, _ *secrethub.AccessLevelIteratorParams) secrethub.AccessLevelIterator
func (*AccessRuleService) List ¶
func (s *AccessRuleService) List(path string, depth int, ancestors bool) ([]*api.AccessRule, error)
List implements the AccessRuleService interface List function.
func (*AccessRuleService) ListLevels ¶
func (s *AccessRuleService) ListLevels(path string) ([]*api.AccessLevel, error)
ListLevels implements the AccessRuleService interface ListLevels function.
func (*AccessRuleService) Set ¶
func (s *AccessRuleService) Set(path string, permission string, accountName string) (*api.AccessRule, error)
Set implements the AccessRuleService interface Set function.
type AccountService ¶
type AccountService struct { MeFunc func() (*api.Account, error) GetFunc func(name string) (*api.Account, error) AccountKeyService secrethub.AccountKeyService }
AccountService is a mock of the AccountService interface.
func (*AccountService) Get ¶
func (s *AccountService) Get(name string) (*api.Account, error)
Get implements the AccountService interface Get function.
func (*AccountService) Keys ¶
func (s *AccountService) Keys() secrethub.AccountKeyService
type AuditEventIterator ¶
type Client ¶
type Client struct { AccessRuleService *AccessRuleService AccountService *AccountService CredentialService *CredentialService DirService *DirService IDPLinkService *IDPLinkService MeService *MeService OrgService *OrgService RepoService *RepoService SecretService *SecretService ServiceService *ServiceService UserService *UserService }
Client implements the secrethub.Client interface.
func (Client) AccessRules ¶
func (c Client) AccessRules() secrethub.AccessRuleService
AccessRules implements the secrethub.Client interface.
func (Client) Accounts ¶
func (c Client) Accounts() secrethub.AccountService
Accounts implements the secrethub.Client interface.
func (Client) Credentials ¶
func (c Client) Credentials() secrethub.CredentialService
func (Client) Dirs ¶
func (c Client) Dirs() secrethub.DirService
Dirs implements the secrethub.Client interface.
func (Client) IDPLinks ¶
func (c Client) IDPLinks() secrethub.IDPLinkService
func (Client) Orgs ¶
func (c Client) Orgs() secrethub.OrgService
Orgs implements the secrethub.Client interface.
func (Client) Repos ¶
func (c Client) Repos() secrethub.RepoService
Repos implements the secrethub.Client interface.
func (Client) Secrets ¶
func (c Client) Secrets() secrethub.SecretService
Secrets implements the secrethub.Client interface.
func (Client) Services ¶
func (c Client) Services() secrethub.ServiceService
Services implements the secrethub.Client interface.
func (Client) Users ¶
func (c Client) Users() secrethub.UserService
Users implements the secrethub.Client interface.
type CredentialIterator ¶
type CredentialIterator struct { Credentials []*api.Credential CurrentIndex int Err error }
func (*CredentialIterator) Next ¶
func (c *CredentialIterator) Next() (api.Credential, error)
type CredentialService ¶
type CredentialService struct { CreateFunc func(credentials.Creator, string) (*api.Credential, error) DisableFunc func(fingerprint string) error ListFunc func(_ *secrethub.CredentialListParams) secrethub.CredentialIterator }
func (*CredentialService) Create ¶
func (c *CredentialService) Create(creator credentials.Creator, description string) (*api.Credential, error)
func (*CredentialService) Disable ¶
func (c *CredentialService) Disable(fingerprint string) error
func (*CredentialService) List ¶
func (c *CredentialService) List(credentialListParams *secrethub.CredentialListParams) secrethub.CredentialIterator
type DirService ¶
type DirService struct { CreateFunc func(path string) (*api.Dir, error) ExistsFunc func(path string) (bool, error) DeleteFunc func(path string) error GetTreeFunc func(path string, depth int, ancestors bool) (*api.Tree, error) secrethub.DirService }
DirService is a mock of the DirService interface.
func (*DirService) Create ¶
func (s *DirService) Create(path string) (*api.Dir, error)
Create implements the DirService interface Create function.
func (*DirService) Delete ¶
func (s *DirService) Delete(path string) error
Delete implements the DirService interface Delete function.
type IDPLinkGCPService ¶
type IDPLinkGCPService struct { CreateFunc func(namespace string, projectID string, authorizationCode string, redirectURI string) (*api.IdentityProviderLink, error) ListFunc func(namespace string, params *secrethub.IdpLinkIteratorParams) secrethub.IdpLinkIterator GetFunc func(namespace string, projectID string) (*api.IdentityProviderLink, error) ExistsFunc func(namespace string, projectID string) (bool, error) DeleteFunc func(namespace string, projectID string) error AuthorizationCodeListenerFunc func(namespace string, projectID string) (oauthorizer.CallbackHandler, error) }
func (IDPLinkGCPService) AuthorizationCodeListener ¶
func (i IDPLinkGCPService) AuthorizationCodeListener(namespace string, projectID string) (oauthorizer.CallbackHandler, error)
func (IDPLinkGCPService) Create ¶
func (i IDPLinkGCPService) Create(namespace string, projectID string, authorizationCode, redirectURI string) (*api.IdentityProviderLink, error)
func (IDPLinkGCPService) Delete ¶
func (i IDPLinkGCPService) Delete(namespace string, projectID string) error
func (IDPLinkGCPService) Exists ¶
func (i IDPLinkGCPService) Exists(namespace string, projectID string) (bool, error)
func (IDPLinkGCPService) Get ¶
func (i IDPLinkGCPService) Get(namespace string, projectID string) (*api.IdentityProviderLink, error)
func (IDPLinkGCPService) List ¶
func (i IDPLinkGCPService) List(namespace string, params *secrethub.IdpLinkIteratorParams) secrethub.IdpLinkIterator
type IDPLinkIterator ¶
type IDPLinkIterator struct { IDPLinks []*api.IdentityProviderLink CurrentIndex int Err error }
func (*IDPLinkIterator) Next ¶
func (c *IDPLinkIterator) Next() (api.IdentityProviderLink, error)
type IDPLinkService ¶
type IDPLinkService struct {
GCPService secrethub.IDPLinkGCPService
}
func (IDPLinkService) GCP ¶
func (i IDPLinkService) GCP() secrethub.IDPLinkGCPService
type MeService ¶
type MeService struct { GetUserFunc func() (*api.User, error) SendVerificationEmailFunc func() error ListReposFunc func() ([]*api.Repo, error) RepoIteratorFunc func(_ *secrethub.RepoIteratorParams) secrethub.RepoIterator }
func (*MeService) RepoIterator ¶
func (m *MeService) RepoIterator(repoIteratorParams *secrethub.RepoIteratorParams) secrethub.RepoIterator
func (*MeService) SendVerificationEmail ¶
type OrgMemberService ¶
type OrgMemberService struct { InviteFunc func(org string, username string, role string) (*api.OrgMember, error) GetFunc func(org string, username string) (*api.OrgMember, error) UpdateFunc func(org string, username string, role string) (*api.OrgMember, error) RevokeFunc func(org string, username string, opts *api.RevokeOpts) (*api.RevokeOrgResponse, error) ListFunc func(org string) ([]*api.OrgMember, error) IteratorFunc func(org string, params *secrethub.OrgMemberIteratorParams) secrethub.OrgMemberIterator }
OrgMemberService is a mock of the OrgMemberService interface.
func (*OrgMemberService) Iterator ¶
func (s *OrgMemberService) Iterator(org string, params *secrethub.OrgMemberIteratorParams) secrethub.OrgMemberIterator
func (*OrgMemberService) List ¶
func (s *OrgMemberService) List(org string) ([]*api.OrgMember, error)
func (*OrgMemberService) Revoke ¶
func (s *OrgMemberService) Revoke(org string, username string, opts *api.RevokeOpts) (*api.RevokeOrgResponse, error)
type OrgService ¶
type OrgService struct { CreateFunc func(name string, description string) (*api.Org, error) DeleteFunc func(name string) error GetFunc func(name string) (*api.Org, error) MembersService secrethub.OrgMemberService ListMineFunc func() ([]*api.Org, error) IteratorFunc func(params *secrethub.OrgIteratorParams) secrethub.OrgIterator }
OrgService is a mock of the RepoService interface.
func (*OrgService) Delete ¶
func (s *OrgService) Delete(name string) error
Delete implements the RepoService interface Delete function.
func (*OrgService) Get ¶
func (s *OrgService) Get(name string) (*api.Org, error)
Get implements the RepoService interface Get function.
func (*OrgService) Iterator ¶
func (s *OrgService) Iterator(params *secrethub.OrgIteratorParams) secrethub.OrgIterator
func (*OrgService) ListMine ¶
func (s *OrgService) ListMine() ([]*api.Org, error)
ListMine implements the RepoService interface ListMine function.
func (*OrgService) Members ¶
func (s *OrgService) Members() secrethub.OrgMemberService
Members returns a mock of the OrgMemberService interface.
type RepoService ¶
type RepoService struct { ListFunc func(namespace string) ([]*api.Repo, error) ListAccountsFunc func(path string) ([]*api.Account, error) ListEventsFunc func(path string, subjectTypes api.AuditSubjectTypeList) ([]*api.Audit, error) ListMineFunc func() ([]*api.Repo, error) CreateFunc func(path string) (*api.Repo, error) DeleteFunc func(path string) error GetFunc func(path string) (*api.Repo, error) UserService secrethub.RepoUserService RepoServiceService secrethub.RepoServiceService AuditEventIterator *AuditEventIterator secrethub.RepoService }
RepoService is a mock of the RepoService interface.
func (*RepoService) Create ¶
func (s *RepoService) Create(path string) (*api.Repo, error)
Create implements the RepoService interface Create function.
func (*RepoService) Delete ¶
func (s *RepoService) Delete(path string) error
Delete implements the RepoService interface Delete function.
func (*RepoService) EventIterator ¶
func (s *RepoService) EventIterator(path string, config *secrethub.AuditEventIteratorParams) secrethub.AuditEventIterator
EventIterator implements the RepoService interface EventIterator function.
func (*RepoService) Get ¶
func (s *RepoService) Get(path string) (*api.Repo, error)
Get implements the RepoService interface Get function.
func (*RepoService) List ¶
func (s *RepoService) List(namespace string) ([]*api.Repo, error)
List implements the RepoService interface List function.
func (*RepoService) ListAccounts ¶
func (s *RepoService) ListAccounts(path string) ([]*api.Account, error)
ListAccounts implements the RepoService interface ListAccounts function.
func (*RepoService) ListEvents ¶
func (s *RepoService) ListEvents(path string, subjectTypes api.AuditSubjectTypeList) ([]*api.Audit, error)
ListEvents implements the RepoService interface ListEvents function.
func (*RepoService) ListMine ¶
func (s *RepoService) ListMine() ([]*api.Repo, error)
ListMine implements the RepoService interface ListMine function.
func (*RepoService) Services ¶
func (s *RepoService) Services() secrethub.RepoServiceService
Services returns the mocked RepoServiceService.
func (*RepoService) Users ¶
func (s *RepoService) Users() secrethub.RepoUserService
Users returns the mocked UserService.
type RepoServiceService ¶
type RepoServiceService struct { ListFunc func(path string) ([]*api.Service, error) IteratorFunc func() secrethub.ServiceIterator }
RepoServiceService is a mock of the RepoServiceService interface.
func (*RepoServiceService) Iterator ¶
func (s *RepoServiceService) Iterator(path string, _ *secrethub.RepoServiceIteratorParams) secrethub.ServiceIterator
type RepoUserService ¶
type RepoUserService struct { InviteFunc func(path string, username string) (*api.RepoMember, error) ListFunc func(path string) ([]*api.User, error) RevokeFunc func(path string, username string) (*api.RevokeRepoResponse, error) IteratorFunc func() secrethub.UserIterator }
RepoUserService is a mock of the RepoUserService interface.
func (*RepoUserService) Invite ¶
func (s *RepoUserService) Invite(path string, username string) (*api.RepoMember, error)
Invite implements the RepoUserService interface Invite function.
func (*RepoUserService) Iterator ¶
func (s *RepoUserService) Iterator(path string, params *secrethub.UserIteratorParams) secrethub.UserIterator
func (*RepoUserService) List ¶
func (s *RepoUserService) List(path string) ([]*api.User, error)
List implements the RepoUserService interface List function.
func (*RepoUserService) Revoke ¶
func (s *RepoUserService) Revoke(path string, username string) (*api.RevokeRepoResponse, error)
Revoke implements the RepoUserService interface Revoke function.
type SecretDeleter ¶
SecretDeleter mocks the Delete function.
func (*SecretDeleter) Delete ¶
func (d *SecretDeleter) Delete(path string) error
Delete saves the arguments it was called with and returns the mocked response.
type SecretEventLister ¶
type SecretEventLister struct { ArgPath string ArgSubjectTypes api.AuditSubjectTypeList ReturnsAuditEvents []*api.Audit Err error }
SecretEventLister mocks the ListEvents function.
func (*SecretEventLister) ListEvents ¶
func (s *SecretEventLister) ListEvents(path string, subjectTypes api.AuditSubjectTypeList) ([]*api.Audit, error)
ListEvents saves the arguments it was called with and returns the mocked response.
type SecretGetter ¶
SecretGetter mocks the Get function.
type SecretReader ¶
type SecretReader struct { ArgPath string ReturnsVersion *api.SecretVersion Err error }
SecretReader mocks the Read function
func (*SecretReader) Read ¶
func (r *SecretReader) Read(path string) (*api.SecretVersion, error)
Read saves the arguments it was called with and returns the mocked response
func (*SecretReader) ReadString ¶
func (r *SecretReader) ReadString(path string) (string, error)
ReadString saves the arguments it was called with and returns the mocked response
type SecretService ¶
type SecretService struct { VersionService secrethub.SecretVersionService DeleteFunc func(path string) error GetFunc func(path string) (*api.Secret, error) ReadFunc func(path string) (*api.SecretVersion, error) ReadStringFunc func(path string) (string, error) ExistsFunc func(path string) (bool, error) WriteFunc func(path string, data []byte) (*api.SecretVersion, error) ListEventsFunc func(path string, subjectTypes api.AuditSubjectTypeList) ([]*api.Audit, error) AuditEventIterator *AuditEventIterator }
SecretService is a mock of the SecretService interface.
func (*SecretService) Delete ¶
func (s *SecretService) Delete(path string) error
Delete implements the SecretService interface Delete function.
func (*SecretService) EventIterator ¶
func (s *SecretService) EventIterator(path string, config *secrethub.AuditEventIteratorParams) secrethub.AuditEventIterator
EventIterator implements the SecretService interface EventIterator function.
func (*SecretService) Exists ¶
func (s *SecretService) Exists(path string) (bool, error)
Exists implements the SecretService interface Exists function.
func (*SecretService) Get ¶
func (s *SecretService) Get(path string) (*api.Secret, error)
Get implements the SecretService interface Get function.
func (*SecretService) ListEvents ¶
func (s *SecretService) ListEvents(path string, subjectTypes api.AuditSubjectTypeList) ([]*api.Audit, error)
ListEvents implements the SecretService interface ListEvents function.
func (*SecretService) Read ¶
func (s *SecretService) Read(path string) (*api.SecretVersion, error)
func (*SecretService) ReadString ¶
func (s *SecretService) ReadString(path string) (string, error)
func (*SecretService) Versions ¶
func (s *SecretService) Versions() secrethub.SecretVersionService
Versions returns a mock of the VersionService interface.
func (*SecretService) Write ¶
func (s *SecretService) Write(path string, data []byte) (*api.SecretVersion, error)
Write implements the SecretService interface Write function.
type SecretVersionService ¶
type SecretVersionService struct { DeleteFunc func(path string) error GetWithDataFunc func(path string) (*api.SecretVersion, error) GetWithoutDataFunc func(path string) (*api.SecretVersion, error) ListWithDataFunc func(path string) ([]*api.SecretVersion, error) ListWithoutDataFunc func(path string) ([]*api.SecretVersion, error) IteratorFunc func(path string, params *secrethub.SecretVersionIteratorParams) secrethub.SecretVersionIterator }
SecretVersionService can be used to mock a SecretVersionService.
func (*SecretVersionService) Delete ¶
func (s *SecretVersionService) Delete(path string) error
Delete implements the SecretVersionService interface Delete function.
func (*SecretVersionService) GetWithData ¶
func (s *SecretVersionService) GetWithData(path string) (*api.SecretVersion, error)
GetWithData implements the SecretVersionService interface GetWithData function.
func (*SecretVersionService) GetWithoutData ¶
func (s *SecretVersionService) GetWithoutData(path string) (*api.SecretVersion, error)
GetWithoutData implements the SecretVersionService interface GetWithoutData function.
func (*SecretVersionService) Iterator ¶
func (s *SecretVersionService) Iterator(path string, params *secrethub.SecretVersionIteratorParams) secrethub.SecretVersionIterator
func (*SecretVersionService) ListWithData ¶
func (s *SecretVersionService) ListWithData(path string) ([]*api.SecretVersion, error)
ListWithData implements the SecretVersionService interface ListWithData function.
func (*SecretVersionService) ListWithoutData ¶
func (s *SecretVersionService) ListWithoutData(path string) ([]*api.SecretVersion, error)
ListWithoutData implements the SecretVersionService interface ListWithoutData function.
type ServiceAWSService ¶
type ServiceAWSService struct {
CreateFunc func(path string, description string, keyID, role string, cfgs ...*aws.Config) (*api.Service, error)
}
ServiceAWSService is a mock of the ServiceAWSService interface.
type ServiceService ¶
type ServiceService struct { CreateFunc func(path string, description string, credentialCreator credentials.Creator) (*api.Service, error) DeleteFunc func(id string) (*api.RevokeRepoResponse, error) GetFunc func(id string) (*api.Service, error) ListFunc func(path string) ([]*api.Service, error) AWSService *ServiceAWSService IteratorFunc func() secrethub.ServiceIterator }
ServiceService is a mock of the ServiceService interface.
func (*ServiceService) Create ¶
func (s *ServiceService) Create(path string, description string, credentialCreator credentials.Creator) (*api.Service, error)
Create implements the ServiceService interface Create function.
func (*ServiceService) Delete ¶
func (s *ServiceService) Delete(id string) (*api.RevokeRepoResponse, error)
Delete implements the ServiceService interface Delete function.
func (*ServiceService) Get ¶
func (s *ServiceService) Get(id string) (*api.Service, error)
Get implements the ServiceService interface Get function.
func (*ServiceService) Iterator ¶
func (s *ServiceService) Iterator(path string, _ *secrethub.ServiceIteratorParams) secrethub.ServiceIterator
type UserService ¶
type UserService struct { GetFunc func(username string) (*api.User, error) MeFunc func() (*api.User, error) }
UserService is a mock of the UserService interface.