mocks

package
v0.0.0-...-2f4d8a3 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppUserRepository

type AppUserRepository struct {
	mock.Mock
}

AppUserRepository is an autogenerated mock type for the AppUserRepository type

func NewAppUserRepository

func NewAppUserRepository(t testing.TB) *AppUserRepository

NewAppUserRepository creates a new instance of AppUserRepository. It also registers a cleanup function to assert the mocks expectations.

func (*AppUserRepository) AddAppUser

AddAppUser provides a mock function with given fields: ctx, operator, param

func (*AppUserRepository) AddFirstOwner

AddFirstOwner provides a mock function with given fields: ctx, operator, param

func (*AppUserRepository) AddSystemOwner

func (_m *AppUserRepository) AddSystemOwner(ctx context.Context, operator domain.SystemAdminModel, organizationID domain.OrganizationID) (domain.AppUserID, error)

AddSystemOwner provides a mock function with given fields: ctx, operator, organizationID

func (*AppUserRepository) FindAppUserByID

func (_m *AppUserRepository) FindAppUserByID(ctx context.Context, operator domain.AppUserModel, id domain.AppUserID) (service.AppUser, error)

FindAppUserByID provides a mock function with given fields: ctx, operator, id

func (*AppUserRepository) FindAppUserByLoginID

func (_m *AppUserRepository) FindAppUserByLoginID(ctx context.Context, operator domain.AppUserModel, loginID string) (service.AppUser, error)

FindAppUserByLoginID provides a mock function with given fields: ctx, operator, loginID

func (*AppUserRepository) FindAppUserIDs

func (_m *AppUserRepository) FindAppUserIDs(ctx context.Context, operator domain.SystemOwnerModel, pageNo int, pageSize int) ([]domain.AppUserID, error)

FindAppUserIDs provides a mock function with given fields: ctx, operator, pageNo, pageSize

func (*AppUserRepository) FindOwnerByLoginID

func (_m *AppUserRepository) FindOwnerByLoginID(ctx context.Context, operator domain.SystemOwnerModel, loginID string) (service.Owner, error)

FindOwnerByLoginID provides a mock function with given fields: ctx, operator, loginID

func (*AppUserRepository) FindSystemOwnerByOrganizationID

func (_m *AppUserRepository) FindSystemOwnerByOrganizationID(ctx context.Context, operator domain.SystemAdminModel, organizationID domain.OrganizationID) (service.SystemOwner, error)

FindSystemOwnerByOrganizationID provides a mock function with given fields: ctx, operator, organizationID

func (*AppUserRepository) FindSystemOwnerByOrganizationName

func (_m *AppUserRepository) FindSystemOwnerByOrganizationName(ctx context.Context, operator domain.SystemAdminModel, organizationName string) (service.SystemOwner, error)

FindSystemOwnerByOrganizationName provides a mock function with given fields: ctx, operator, organizationName

type OrganizationRepository

type OrganizationRepository struct {
	mock.Mock
}

OrganizationRepository is an autogenerated mock type for the OrganizationRepository type

func NewOrganizationRepository

func NewOrganizationRepository(t testing.TB) *OrganizationRepository

NewOrganizationRepository creates a new instance of OrganizationRepository. It also registers a cleanup function to assert the mocks expectations.

func (*OrganizationRepository) AddOrganization

AddOrganization provides a mock function with given fields: ctx, operator, param

func (*OrganizationRepository) FindOrganizationByID

FindOrganizationByID provides a mock function with given fields: ctx, operator, id

func (*OrganizationRepository) FindOrganizationByName

func (_m *OrganizationRepository) FindOrganizationByName(ctx context.Context, operator domain.SystemAdminModel, name string) (service.Organization, error)

FindOrganizationByName provides a mock function with given fields: ctx, operator, name

func (*OrganizationRepository) GetOrganization

func (_m *OrganizationRepository) GetOrganization(ctx context.Context, operator domain.AppUserModel) (service.Organization, error)

GetOrganization provides a mock function with given fields: ctx, operator

type RBACRepository

type RBACRepository struct {
	mock.Mock
}

RBACRepository is an autogenerated mock type for the RBACRepository type

func NewRBACRepository

func NewRBACRepository(t testing.TB) *RBACRepository

NewRBACRepository creates a new instance of RBACRepository. It also registers a cleanup function to assert the mocks expectations.

func (*RBACRepository) AddNamedGroupingPolicy

func (_m *RBACRepository) AddNamedGroupingPolicy(subject domain.RBACUser, object domain.RBACRole) error

AddNamedGroupingPolicy provides a mock function with given fields: subject, object

func (*RBACRepository) AddNamedPolicy

func (_m *RBACRepository) AddNamedPolicy(subject domain.RBACRole, object domain.RBACObject, action domain.RBACAction) error

AddNamedPolicy provides a mock function with given fields: subject, object, action

func (*RBACRepository) Init

func (_m *RBACRepository) Init() error

Init provides a mock function with given fields:

func (*RBACRepository) NewEnforcerWithRolesAndUsers

func (_m *RBACRepository) NewEnforcerWithRolesAndUsers(roles []domain.RBACRole, users []domain.RBACUser) (*casbin.Enforcer, error)

NewEnforcerWithRolesAndUsers provides a mock function with given fields: roles, users

type RepositoryFactory

type RepositoryFactory struct {
	mock.Mock
}

RepositoryFactory is an autogenerated mock type for the RepositoryFactory type

func NewRepositoryFactory

func NewRepositoryFactory(t testing.TB) *RepositoryFactory

NewRepositoryFactory creates a new instance of RepositoryFactory. It also registers a cleanup function to assert the mocks expectations.

func (*RepositoryFactory) NewAppUserGroupRepository

func (_m *RepositoryFactory) NewAppUserGroupRepository(ctx context.Context) service.AppUserGroupRepository

NewAppUserGroupRepository provides a mock function with given fields: ctx

func (*RepositoryFactory) NewAppUserRepository

func (_m *RepositoryFactory) NewAppUserRepository(ctx context.Context) service.AppUserRepository

NewAppUserRepository provides a mock function with given fields: ctx

func (*RepositoryFactory) NewGroupUserRepository

func (_m *RepositoryFactory) NewGroupUserRepository(ctx context.Context) service.GroupUserRepository

NewGroupUserRepository provides a mock function with given fields: ctx

func (*RepositoryFactory) NewOrganizationRepository

func (_m *RepositoryFactory) NewOrganizationRepository(ctx context.Context) service.OrganizationRepository

NewOrganizationRepository provides a mock function with given fields: ctx

func (*RepositoryFactory) NewRBACRepository

func (_m *RepositoryFactory) NewRBACRepository(ctx context.Context) service.RBACRepository

NewRBACRepository provides a mock function with given fields: ctx

func (*RepositoryFactory) NewSpaceRepository

func (_m *RepositoryFactory) NewSpaceRepository(ctx context.Context) service.SpaceRepository

NewSpaceRepository provides a mock function with given fields: ctx

func (*RepositoryFactory) NewUserSpaceRepository

func (_m *RepositoryFactory) NewUserSpaceRepository(ctx context.Context) service.UserSpaceRepository

NewUserSpaceRepository provides a mock function with given fields: ctx

type Space

type Space struct {
	mock.Mock
}

Space is an autogenerated mock type for the Space type

func NewSpace

func NewSpace(t testing.TB) *Space

NewSpace creates a new instance of Space. It also registers a cleanup function to assert the mocks expectations.

func (*Space) GetCreatedAt

func (_m *Space) GetCreatedAt() time.Time

GetCreatedAt provides a mock function with given fields:

func (*Space) GetCreatedBy

func (_m *Space) GetCreatedBy() uint

GetCreatedBy provides a mock function with given fields:

func (*Space) GetDescription

func (_m *Space) GetDescription() string

GetDescription provides a mock function with given fields:

func (*Space) GetID

func (_m *Space) GetID() uint

GetID provides a mock function with given fields:

func (*Space) GetKey

func (_m *Space) GetKey() string

GetKey provides a mock function with given fields:

func (*Space) GetName

func (_m *Space) GetName() string

GetName provides a mock function with given fields:

func (*Space) GetOrganizationID

func (_m *Space) GetOrganizationID() domain.OrganizationID

GetOrganizationID provides a mock function with given fields:

func (*Space) GetUpdatedAt

func (_m *Space) GetUpdatedAt() time.Time

GetUpdatedAt provides a mock function with given fields:

func (*Space) GetUpdatedBy

func (_m *Space) GetUpdatedBy() uint

GetUpdatedBy provides a mock function with given fields:

func (*Space) GetVersion

func (_m *Space) GetVersion() int

GetVersion provides a mock function with given fields:

type SpaceRepository

type SpaceRepository struct {
	mock.Mock
}

SpaceRepository is an autogenerated mock type for the SpaceRepository type

func NewSpaceRepository

func NewSpaceRepository(t testing.TB) *SpaceRepository

NewSpaceRepository creates a new instance of SpaceRepository. It also registers a cleanup function to assert the mocks expectations.

func (*SpaceRepository) AddDefaultSpace

func (_m *SpaceRepository) AddDefaultSpace(ctx context.Context, operator domain.SystemOwnerModel) (uint, error)

AddDefaultSpace provides a mock function with given fields: ctx, operator

func (*SpaceRepository) AddPersonalSpace

func (_m *SpaceRepository) AddPersonalSpace(ctx context.Context, operator domain.SystemOwnerModel, appUser domain.AppUserModel) (domain.SpaceID, error)

AddPersonalSpace provides a mock function with given fields: ctx, operator, appUser

func (*SpaceRepository) AddSystemSpace

func (_m *SpaceRepository) AddSystemSpace(ctx context.Context, operator domain.SystemOwnerModel) (domain.SpaceID, error)

AddSystemSpace provides a mock function with given fields: ctx, operator

func (*SpaceRepository) FindDefaultSpace

func (_m *SpaceRepository) FindDefaultSpace(ctx context.Context, operator domain.AppUserModel) (service.Space, error)

FindDefaultSpace provides a mock function with given fields: ctx, operator

func (*SpaceRepository) FindPersonalSpace

func (_m *SpaceRepository) FindPersonalSpace(ctx context.Context, operator domain.AppUserModel) (service.Space, error)

FindPersonalSpace provides a mock function with given fields: ctx, operator

func (*SpaceRepository) FindSystemSpace

func (_m *SpaceRepository) FindSystemSpace(ctx context.Context, operator domain.AppUserModel) (service.Space, error)

FindSystemSpace provides a mock function with given fields: ctx, operator

Jump to

Keyboard shortcuts

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