mocks

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package mocks contains mocks for testing purposes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

func (_m *Repository) AssignParentGroup(ctx context.Context, parentGroupID string, groupIDs ...string) error

AssignParentGroup provides a mock function with given fields: ctx, parentGroupID, groupIDs

func (*Repository) ChangeStatus

func (_m *Repository) ChangeStatus(ctx context.Context, group groups.Group) (groups.Group, error)

ChangeStatus provides a mock function with given fields: ctx, group

func (*Repository) Delete

func (_m *Repository) Delete(ctx context.Context, groupID string) error

Delete provides a mock function with given fields: ctx, groupID

func (*Repository) RetrieveAll

func (_m *Repository) RetrieveAll(ctx context.Context, gm groups.Page) (groups.Page, error)

RetrieveAll provides a mock function with given fields: ctx, gm

func (*Repository) RetrieveByID

func (_m *Repository) RetrieveByID(ctx context.Context, id string) (groups.Group, error)

RetrieveByID provides a mock function with given fields: ctx, id

func (*Repository) RetrieveByIDs

func (_m *Repository) RetrieveByIDs(ctx context.Context, gm groups.Page, ids ...string) (groups.Page, error)

RetrieveByIDs provides a mock function with given fields: ctx, gm, ids

func (*Repository) Save

func (_m *Repository) Save(ctx context.Context, g groups.Group) (groups.Group, error)

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

func (*Repository) UnassignParentGroup

func (_m *Repository) UnassignParentGroup(ctx context.Context, parentGroupID string, groupIDs ...string) error

UnassignParentGroup provides a mock function with given fields: ctx, parentGroupID, groupIDs

func (*Repository) Update

func (_m *Repository) Update(ctx context.Context, g groups.Group) (groups.Group, error)

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

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

func (_m *Service) Assign(ctx context.Context, token string, groupID string, relation string, memberKind string, memberIDs ...string) error

Assign provides a mock function with given fields: ctx, token, groupID, relation, memberKind, memberIDs

func (*Service) CreateGroup

func (_m *Service) CreateGroup(ctx context.Context, token string, kind string, g groups.Group) (groups.Group, error)

CreateGroup provides a mock function with given fields: ctx, token, kind, g

func (*Service) DeleteGroup

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

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

func (*Service) DisableGroup

func (_m *Service) DisableGroup(ctx context.Context, token string, id string) (groups.Group, error)

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

func (*Service) EnableGroup

func (_m *Service) EnableGroup(ctx context.Context, token string, id string) (groups.Group, error)

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

func (*Service) ListGroups

func (_m *Service) ListGroups(ctx context.Context, token string, memberKind string, memberID string, gm groups.Page) (groups.Page, error)

ListGroups provides a mock function with given fields: ctx, token, memberKind, memberID, gm

func (*Service) ListMembers

func (_m *Service) ListMembers(ctx context.Context, token string, groupID string, permission string, memberKind string) (groups.MembersPage, error)

ListMembers provides a mock function with given fields: ctx, token, groupID, permission, memberKind

func (*Service) Unassign

func (_m *Service) Unassign(ctx context.Context, token string, groupID string, relation string, memberKind string, memberIDs ...string) error

Unassign provides a mock function with given fields: ctx, token, groupID, relation, memberKind, memberIDs

func (*Service) UpdateGroup

func (_m *Service) UpdateGroup(ctx context.Context, token string, g groups.Group) (groups.Group, error)

UpdateGroup provides a mock function with given fields: ctx, token, g

func (*Service) ViewGroup

func (_m *Service) ViewGroup(ctx context.Context, token string, id string) (groups.Group, error)

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

func (*Service) ViewGroupPerms

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

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

Jump to

Keyboard shortcuts

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