Documentation ¶
Overview ¶
Package mocks contains mocks for testing purposes.
Index ¶
- Constants
- type Cache
- type Repository
- func (_m *Repository) ChangeStatus(ctx context.Context, client clients.Client) (clients.Client, error)
- func (_m *Repository) Delete(ctx context.Context, id 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) RetrieveBySecret(ctx context.Context, key 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) Authorize(ctx context.Context, req *magistrala.AuthorizeReq) (string, error)
- func (_m *Service) CreateThings(ctx context.Context, token string, client ...clients.Client) ([]clients.Client, error)
- func (_m *Service) DeleteClient(ctx context.Context, token string, id string) error
- 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) Identify(ctx context.Context, key string) (string, error)
- func (_m *Service) ListClients(ctx context.Context, token string, reqUserID string, pm clients.Page) (clients.ClientsPage, error)
- func (_m *Service) ListClientsByGroup(ctx context.Context, token string, groupID string, pm clients.Page) (clients.MembersPage, error)
- func (_m *Service) Share(ctx context.Context, token string, id string, relation string, ...) error
- func (_m *Service) Unshare(ctx context.Context, token string, id string, relation string, ...) error
- func (_m *Service) UpdateClient(ctx context.Context, token string, client clients.Client) (clients.Client, error)
- func (_m *Service) UpdateClientSecret(ctx context.Context, token string, id string, key 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) ViewClientPerms(ctx context.Context, token string, id string) ([]string, error)
- type ThingAuthzService
Constants ¶
const WrongID = "wrongID"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
Cache is an autogenerated mock type for the Cache type
func NewCache ¶
NewCache creates a new instance of Cache. 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.
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) Delete ¶
func (_m *Repository) Delete(ctx context.Context, id string) error
Delete provides a mock function with given fields: ctx, id
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) RetrieveBySecret ¶
RetrieveBySecret provides a mock function with given fields: ctx, key
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) Authorize ¶
func (_m *Service) Authorize(ctx context.Context, req *magistrala.AuthorizeReq) (string, error)
Authorize provides a mock function with given fields: ctx, req
func (*Service) CreateThings ¶
func (_m *Service) CreateThings(ctx context.Context, token string, client ...clients.Client) ([]clients.Client, error)
CreateThings provides a mock function with given fields: ctx, token, client
func (*Service) DeleteClient ¶
DeleteClient provides a mock function with given fields: ctx, token, id
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) ListClients ¶
func (_m *Service) ListClients(ctx context.Context, token string, reqUserID string, pm clients.Page) (clients.ClientsPage, error)
ListClients provides a mock function with given fields: ctx, token, reqUserID, pm
func (*Service) ListClientsByGroup ¶
func (_m *Service) ListClientsByGroup(ctx context.Context, token string, groupID string, pm clients.Page) (clients.MembersPage, error)
ListClientsByGroup provides a mock function with given fields: ctx, token, groupID, pm
func (*Service) Share ¶
func (_m *Service) Share(ctx context.Context, token string, id string, relation string, userids ...string) error
Share provides a mock function with given fields: ctx, token, id, relation, userids
func (*Service) Unshare ¶
func (_m *Service) Unshare(ctx context.Context, token string, id string, relation string, userids ...string) error
Unshare provides a mock function with given fields: ctx, token, id, relation, userids
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) UpdateClientSecret ¶
func (_m *Service) UpdateClientSecret(ctx context.Context, token string, id string, key string) (clients.Client, error)
UpdateClientSecret provides a mock function with given fields: ctx, token, id, key
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
type ThingAuthzService ¶
func (*ThingAuthzService) Authorize ¶
func (m *ThingAuthzService) Authorize(ctx context.Context, in *magistrala.AuthorizeReq, opts ...grpc.CallOption) (*magistrala.AuthorizeRes, error)