Documentation ¶
Overview ¶
Package mocks contains mocks for testing purposes.
Index ¶
- func NewEmailer() users.Emailer
- func NewHasher() users.Hasher
- type Repository
- func (_m *Repository) ChangeStatus(ctx context.Context, client clients.Client) (clients.Client, error)
- func (_m *Repository) CheckSuperAdmin(ctx context.Context, adminID string) error
- func (_m *Repository) RetrieveAll(ctx context.Context, pm clients.Page) (clients.ClientsPage, error)
- func (_m *Repository) RetrieveAllBasicInfo(ctx context.Context, pm clients.Page) (clients.ClientsPage, error)
- func (_m *Repository) RetrieveAllByIDs(ctx context.Context, pm clients.Page) (clients.ClientsPage, error)
- func (_m *Repository) RetrieveByID(ctx context.Context, id string) (clients.Client, error)
- func (_m *Repository) RetrieveByIdentity(ctx context.Context, identity string) (clients.Client, error)
- func (_m *Repository) Save(ctx context.Context, client clients.Client) (clients.Client, error)
- func (_m *Repository) Update(ctx context.Context, client clients.Client) (clients.Client, error)
- func (_m *Repository) UpdateIdentity(ctx context.Context, client clients.Client) (clients.Client, error)
- func (_m *Repository) UpdateRole(ctx context.Context, client clients.Client) (clients.Client, error)
- func (_m *Repository) UpdateSecret(ctx context.Context, client clients.Client) (clients.Client, error)
- func (_m *Repository) UpdateTags(ctx context.Context, client clients.Client) (clients.Client, error)
- type Service
- func (_m *Service) DisableClient(ctx context.Context, token string, id string) (clients.Client, error)
- func (_m *Service) EnableClient(ctx context.Context, token string, id string) (clients.Client, error)
- func (_m *Service) GenerateResetToken(ctx context.Context, email string, host string) error
- func (_m *Service) Identify(ctx context.Context, tkn string) (string, error)
- func (_m *Service) IssueToken(ctx context.Context, identity string, secret string, domainID string) (*magistrala.Token, error)
- func (_m *Service) ListClients(ctx context.Context, token string, pm clients.Page) (clients.ClientsPage, error)
- func (_m *Service) ListMembers(ctx context.Context, token string, objectKind string, objectID string, ...) (clients.MembersPage, error)
- func (_m *Service) RefreshToken(ctx context.Context, accessToken string, domainID string) (*magistrala.Token, error)
- func (_m *Service) RegisterClient(ctx context.Context, token string, client clients.Client) (clients.Client, error)
- func (_m *Service) ResetSecret(ctx context.Context, resetToken string, secret string) error
- func (_m *Service) SendPasswordReset(ctx context.Context, host string, email string, user string, token string) error
- func (_m *Service) UpdateClient(ctx context.Context, token string, client clients.Client) (clients.Client, error)
- func (_m *Service) UpdateClientIdentity(ctx context.Context, token string, id string, identity string) (clients.Client, error)
- func (_m *Service) UpdateClientRole(ctx context.Context, token string, client clients.Client) (clients.Client, error)
- func (_m *Service) UpdateClientSecret(ctx context.Context, token string, oldSecret string, newSecret string) (clients.Client, error)
- func (_m *Service) UpdateClientTags(ctx context.Context, token string, client clients.Client) (clients.Client, error)
- func (_m *Service) ViewClient(ctx context.Context, token string, id string) (clients.Client, error)
- func (_m *Service) ViewProfile(ctx context.Context, token string) (clients.Client, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEmailer ¶
NewEmailer provides emailer instance for the test.
Types ¶
type Repository ¶
Repository is an autogenerated mock type for the Repository type
func NewRepository ¶
func NewRepository(t interface { mock.TestingT Cleanup(func()) }) *Repository
NewRepository creates a new instance of Repository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Repository) ChangeStatus ¶
func (_m *Repository) ChangeStatus(ctx context.Context, client clients.Client) (clients.Client, error)
ChangeStatus provides a mock function with given fields: ctx, client
func (*Repository) CheckSuperAdmin ¶
func (_m *Repository) CheckSuperAdmin(ctx context.Context, adminID string) error
CheckSuperAdmin provides a mock function with given fields: ctx, adminID
func (*Repository) RetrieveAll ¶
func (_m *Repository) RetrieveAll(ctx context.Context, pm clients.Page) (clients.ClientsPage, error)
RetrieveAll provides a mock function with given fields: ctx, pm
func (*Repository) RetrieveAllBasicInfo ¶
func (_m *Repository) RetrieveAllBasicInfo(ctx context.Context, pm clients.Page) (clients.ClientsPage, error)
RetrieveAllBasicInfo provides a mock function with given fields: ctx, pm
func (*Repository) RetrieveAllByIDs ¶
func (_m *Repository) RetrieveAllByIDs(ctx context.Context, pm clients.Page) (clients.ClientsPage, error)
RetrieveAllByIDs provides a mock function with given fields: ctx, pm
func (*Repository) RetrieveByID ¶
RetrieveByID provides a mock function with given fields: ctx, id
func (*Repository) RetrieveByIdentity ¶
func (_m *Repository) RetrieveByIdentity(ctx context.Context, identity string) (clients.Client, error)
RetrieveByIdentity provides a mock function with given fields: ctx, identity
func (*Repository) UpdateIdentity ¶
func (_m *Repository) UpdateIdentity(ctx context.Context, client clients.Client) (clients.Client, error)
UpdateIdentity provides a mock function with given fields: ctx, client
func (*Repository) UpdateRole ¶
func (_m *Repository) UpdateRole(ctx context.Context, client clients.Client) (clients.Client, error)
UpdateRole provides a mock function with given fields: ctx, client
func (*Repository) UpdateSecret ¶
func (_m *Repository) UpdateSecret(ctx context.Context, client clients.Client) (clients.Client, error)
UpdateSecret provides a mock function with given fields: ctx, client
func (*Repository) UpdateTags ¶
func (_m *Repository) UpdateTags(ctx context.Context, client clients.Client) (clients.Client, error)
UpdateTags provides a mock function with given fields: ctx, client
type Service ¶
Service is an autogenerated mock type for the Service type
func NewService ¶
NewService creates a new instance of Service. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Service) DisableClient ¶
func (_m *Service) DisableClient(ctx context.Context, token string, id string) (clients.Client, error)
DisableClient provides a mock function with given fields: ctx, token, id
func (*Service) EnableClient ¶
func (_m *Service) EnableClient(ctx context.Context, token string, id string) (clients.Client, error)
EnableClient provides a mock function with given fields: ctx, token, id
func (*Service) GenerateResetToken ¶
GenerateResetToken provides a mock function with given fields: ctx, email, host
func (*Service) IssueToken ¶
func (_m *Service) IssueToken(ctx context.Context, identity string, secret string, domainID string) (*magistrala.Token, error)
IssueToken provides a mock function with given fields: ctx, identity, secret, domainID
func (*Service) ListClients ¶
func (_m *Service) ListClients(ctx context.Context, token string, pm clients.Page) (clients.ClientsPage, error)
ListClients provides a mock function with given fields: ctx, token, pm
func (*Service) ListMembers ¶
func (_m *Service) ListMembers(ctx context.Context, token string, objectKind string, objectID string, pm clients.Page) (clients.MembersPage, error)
ListMembers provides a mock function with given fields: ctx, token, objectKind, objectID, pm
func (*Service) RefreshToken ¶
func (_m *Service) RefreshToken(ctx context.Context, accessToken string, domainID string) (*magistrala.Token, error)
RefreshToken provides a mock function with given fields: ctx, accessToken, domainID
func (*Service) RegisterClient ¶
func (_m *Service) RegisterClient(ctx context.Context, token string, client clients.Client) (clients.Client, error)
RegisterClient provides a mock function with given fields: ctx, token, client
func (*Service) ResetSecret ¶
ResetSecret provides a mock function with given fields: ctx, resetToken, secret
func (*Service) SendPasswordReset ¶
func (_m *Service) SendPasswordReset(ctx context.Context, host string, email string, user string, token string) error
SendPasswordReset provides a mock function with given fields: ctx, host, email, user, token
func (*Service) UpdateClient ¶
func (_m *Service) UpdateClient(ctx context.Context, token string, client clients.Client) (clients.Client, error)
UpdateClient provides a mock function with given fields: ctx, token, client
func (*Service) UpdateClientIdentity ¶
func (_m *Service) UpdateClientIdentity(ctx context.Context, token string, id string, identity string) (clients.Client, error)
UpdateClientIdentity provides a mock function with given fields: ctx, token, id, identity
func (*Service) UpdateClientRole ¶
func (_m *Service) UpdateClientRole(ctx context.Context, token string, client clients.Client) (clients.Client, error)
UpdateClientRole provides a mock function with given fields: ctx, token, client
func (*Service) UpdateClientSecret ¶
func (_m *Service) UpdateClientSecret(ctx context.Context, token string, oldSecret string, newSecret string) (clients.Client, error)
UpdateClientSecret provides a mock function with given fields: ctx, token, oldSecret, newSecret
func (*Service) UpdateClientTags ¶
func (_m *Service) UpdateClientTags(ctx context.Context, token string, client clients.Client) (clients.Client, error)
UpdateClientTags provides a mock function with given fields: ctx, token, client
func (*Service) ViewClient ¶
ViewClient provides a mock function with given fields: ctx, token, id