mocks

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package mocks contains mocks for testing purposes.

Index

Constants

View Source
const WrongID = "wrongID"

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	mock.Mock
}

Cache is an autogenerated mock type for the Cache type

func NewCache

func NewCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *Cache

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.

func (*Cache) ID

func (_m *Cache) ID(ctx context.Context, thingSecret string) (string, error)

ID provides a mock function with given fields: ctx, thingSecret

func (*Cache) Remove

func (_m *Cache) Remove(ctx context.Context, thingID string) error

Remove provides a mock function with given fields: ctx, thingID

func (*Cache) Save

func (_m *Cache) Save(ctx context.Context, thingSecret string, thingID string) error

Save provides a mock function with given fields: ctx, thingSecret, thingID

type Repository

type Repository struct {
	mock.Mock
}

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

func (_m *Repository) RetrieveByID(ctx context.Context, id string) (clients.Client, error)

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

func (_m *Repository) RetrieveBySecret(ctx context.Context, key string) (clients.Client, error)

RetrieveBySecret provides a mock function with given fields: ctx, key

func (*Repository) Save

func (_m *Repository) Save(ctx context.Context, client ...clients.Client) ([]clients.Client, error)

Save provides a mock function with given fields: ctx, client

func (*Repository) Update

func (_m *Repository) Update(ctx context.Context, client clients.Client) (clients.Client, error)

Update provides a mock function with given fields: ctx, client

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

type Service struct {
	mock.Mock
}

Service is an autogenerated mock type for the Service type

func NewService

func NewService(t interface {
	mock.TestingT
	Cleanup(func())
}) *Service

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

func (_m *Service) DeleteClient(ctx context.Context, token string, id string) error

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) Identify

func (_m *Service) Identify(ctx context.Context, key string) (string, error)

Identify provides a mock function with given fields: ctx, key

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

func (_m *Service) ViewClient(ctx context.Context, token string, id string) (clients.Client, error)

ViewClient provides a mock function with given fields: ctx, token, id

func (*Service) ViewClientPerms

func (_m *Service) ViewClientPerms(ctx context.Context, token string, id string) ([]string, error)

ViewClientPerms provides a mock function with given fields: ctx, token, id

type ThingAuthzService

type ThingAuthzService struct {
	mock.Mock
}

func (*ThingAuthzService) Authorize

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL