mocks

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelsServiceClient

type ChannelsServiceClient struct {
	mock.Mock
}

ChannelsServiceClient is an autogenerated mock type for the ChannelsServiceClient type

func NewChannelsServiceClient

func NewChannelsServiceClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *ChannelsServiceClient

NewChannelsServiceClient creates a new instance of ChannelsServiceClient. 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 (*ChannelsServiceClient) Authorize

func (_m *ChannelsServiceClient) Authorize(ctx context.Context, in *v1.AuthzReq, opts ...grpc.CallOption) (*v1.AuthzRes, error)

Authorize provides a mock function with given fields: ctx, in, opts

func (*ChannelsServiceClient) EXPECT

func (*ChannelsServiceClient) RemoveClientConnections

RemoveClientConnections provides a mock function with given fields: ctx, in, opts

func (*ChannelsServiceClient) RetrieveEntity

RetrieveEntity provides a mock function with given fields: ctx, in, opts

func (*ChannelsServiceClient) UnsetParentGroupFromChannels

UnsetParentGroupFromChannels provides a mock function with given fields: ctx, in, opts

type ChannelsServiceClient_Authorize_Call

type ChannelsServiceClient_Authorize_Call struct {
	*mock.Call
}

ChannelsServiceClient_Authorize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Authorize'

func (*ChannelsServiceClient_Authorize_Call) Return

func (*ChannelsServiceClient_Authorize_Call) Run

func (*ChannelsServiceClient_Authorize_Call) RunAndReturn

type ChannelsServiceClient_Expecter

type ChannelsServiceClient_Expecter struct {
	// contains filtered or unexported fields
}

func (*ChannelsServiceClient_Expecter) Authorize

func (_e *ChannelsServiceClient_Expecter) Authorize(ctx interface{}, in interface{}, opts ...interface{}) *ChannelsServiceClient_Authorize_Call

Authorize is a helper method to define mock.On call

  • ctx context.Context
  • in *v1.AuthzReq
  • opts ...grpc.CallOption

func (*ChannelsServiceClient_Expecter) RemoveClientConnections

func (_e *ChannelsServiceClient_Expecter) RemoveClientConnections(ctx interface{}, in interface{}, opts ...interface{}) *ChannelsServiceClient_RemoveClientConnections_Call

RemoveClientConnections is a helper method to define mock.On call

  • ctx context.Context
  • in *v1.RemoveClientConnectionsReq
  • opts ...grpc.CallOption

func (*ChannelsServiceClient_Expecter) RetrieveEntity

func (_e *ChannelsServiceClient_Expecter) RetrieveEntity(ctx interface{}, in interface{}, opts ...interface{}) *ChannelsServiceClient_RetrieveEntity_Call

RetrieveEntity is a helper method to define mock.On call

  • ctx context.Context
  • in *commonv1.RetrieveEntityReq
  • opts ...grpc.CallOption

func (*ChannelsServiceClient_Expecter) UnsetParentGroupFromChannels

func (_e *ChannelsServiceClient_Expecter) UnsetParentGroupFromChannels(ctx interface{}, in interface{}, opts ...interface{}) *ChannelsServiceClient_UnsetParentGroupFromChannels_Call

UnsetParentGroupFromChannels is a helper method to define mock.On call

  • ctx context.Context
  • in *v1.UnsetParentGroupFromChannelsReq
  • opts ...grpc.CallOption

type ChannelsServiceClient_RemoveClientConnections_Call

type ChannelsServiceClient_RemoveClientConnections_Call struct {
	*mock.Call
}

ChannelsServiceClient_RemoveClientConnections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveClientConnections'

func (*ChannelsServiceClient_RemoveClientConnections_Call) Return

func (*ChannelsServiceClient_RemoveClientConnections_Call) Run

type ChannelsServiceClient_RetrieveEntity_Call

type ChannelsServiceClient_RetrieveEntity_Call struct {
	*mock.Call
}

ChannelsServiceClient_RetrieveEntity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetrieveEntity'

func (*ChannelsServiceClient_RetrieveEntity_Call) Return

func (*ChannelsServiceClient_RetrieveEntity_Call) Run

type ChannelsServiceClient_UnsetParentGroupFromChannels_Call

type ChannelsServiceClient_UnsetParentGroupFromChannels_Call struct {
	*mock.Call
}

ChannelsServiceClient_UnsetParentGroupFromChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsetParentGroupFromChannels'

func (*ChannelsServiceClient_UnsetParentGroupFromChannels_Call) Run

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

func (_m *Repository) AddConnections(ctx context.Context, conns []channels.Connection) error

AddConnections provides a mock function with given fields: ctx, conns

func (*Repository) AddRoles

func (_m *Repository) AddRoles(ctx context.Context, rps []roles.RoleProvision) ([]roles.Role, error)

AddRoles provides a mock function with given fields: ctx, rps

func (*Repository) ChangeStatus

func (_m *Repository) ChangeStatus(ctx context.Context, channel channels.Channel) (channels.Channel, error)

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

func (*Repository) ChannelConnectionsCount

func (_m *Repository) ChannelConnectionsCount(ctx context.Context, id string) (uint64, error)

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

func (*Repository) CheckConnection

func (_m *Repository) CheckConnection(ctx context.Context, conn channels.Connection) error

CheckConnection provides a mock function with given fields: ctx, conn

func (*Repository) ClientAuthorize

func (_m *Repository) ClientAuthorize(ctx context.Context, conn channels.Connection) error

ClientAuthorize provides a mock function with given fields: ctx, conn

func (*Repository) DoesChannelHaveConnections

func (_m *Repository) DoesChannelHaveConnections(ctx context.Context, id string) (bool, error)

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

func (*Repository) Remove

func (_m *Repository) Remove(ctx context.Context, ids ...string) error

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

func (*Repository) RemoveChannelConnections

func (_m *Repository) RemoveChannelConnections(ctx context.Context, channelID string) error

RemoveChannelConnections provides a mock function with given fields: ctx, channelID

func (*Repository) RemoveClientConnections

func (_m *Repository) RemoveClientConnections(ctx context.Context, clientID string) error

RemoveClientConnections provides a mock function with given fields: ctx, clientID

func (*Repository) RemoveConnections

func (_m *Repository) RemoveConnections(ctx context.Context, conns []channels.Connection) error

RemoveConnections provides a mock function with given fields: ctx, conns

func (*Repository) RemoveMemberFromAllRoles

func (_m *Repository) RemoveMemberFromAllRoles(ctx context.Context, memberID string) error

RemoveMemberFromAllRoles provides a mock function with given fields: ctx, memberID

func (*Repository) RemoveParentGroup

func (_m *Repository) RemoveParentGroup(ctx context.Context, ch channels.Channel) error

RemoveParentGroup provides a mock function with given fields: ctx, ch

func (*Repository) RemoveRoles

func (_m *Repository) RemoveRoles(ctx context.Context, roleIDs []string) error

RemoveRoles provides a mock function with given fields: ctx, roleIDs

func (*Repository) RetrieveAll

func (_m *Repository) RetrieveAll(ctx context.Context, pm channels.PageMetadata) (channels.Page, error)

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

func (*Repository) RetrieveAllRoles

func (_m *Repository) RetrieveAllRoles(ctx context.Context, entityID string, limit uint64, offset uint64) (roles.RolePage, error)

RetrieveAllRoles provides a mock function with given fields: ctx, entityID, limit, offset

func (*Repository) RetrieveByID

func (_m *Repository) RetrieveByID(ctx context.Context, id string) (channels.Channel, error)

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

func (*Repository) RetrieveEntitiesRolesActionsMembers

func (_m *Repository) RetrieveEntitiesRolesActionsMembers(ctx context.Context, entityIDs []string) ([]roles.EntityActionRole, []roles.EntityMemberRole, error)

RetrieveEntitiesRolesActionsMembers provides a mock function with given fields: ctx, entityIDs

func (*Repository) RetrieveParentGroupChannels

func (_m *Repository) RetrieveParentGroupChannels(ctx context.Context, parentGroupID string) ([]channels.Channel, error)

RetrieveParentGroupChannels provides a mock function with given fields: ctx, parentGroupID

func (*Repository) RetrieveRole

func (_m *Repository) RetrieveRole(ctx context.Context, roleID string) (roles.Role, error)

RetrieveRole provides a mock function with given fields: ctx, roleID

func (*Repository) RetrieveRoleByEntityIDAndName

func (_m *Repository) RetrieveRoleByEntityIDAndName(ctx context.Context, entityID string, roleName string) (roles.Role, error)

RetrieveRoleByEntityIDAndName provides a mock function with given fields: ctx, entityID, roleName

func (*Repository) RoleAddActions

func (_m *Repository) RoleAddActions(ctx context.Context, role roles.Role, actions []string) ([]string, error)

RoleAddActions provides a mock function with given fields: ctx, role, actions

func (*Repository) RoleAddMembers

func (_m *Repository) RoleAddMembers(ctx context.Context, role roles.Role, members []string) ([]string, error)

RoleAddMembers provides a mock function with given fields: ctx, role, members

func (*Repository) RoleCheckActionsExists

func (_m *Repository) RoleCheckActionsExists(ctx context.Context, roleID string, actions []string) (bool, error)

RoleCheckActionsExists provides a mock function with given fields: ctx, roleID, actions

func (*Repository) RoleCheckMembersExists

func (_m *Repository) RoleCheckMembersExists(ctx context.Context, roleID string, members []string) (bool, error)

RoleCheckMembersExists provides a mock function with given fields: ctx, roleID, members

func (*Repository) RoleListActions

func (_m *Repository) RoleListActions(ctx context.Context, roleID string) ([]string, error)

RoleListActions provides a mock function with given fields: ctx, roleID

func (*Repository) RoleListMembers

func (_m *Repository) RoleListMembers(ctx context.Context, roleID string, limit uint64, offset uint64) (roles.MembersPage, error)

RoleListMembers provides a mock function with given fields: ctx, roleID, limit, offset

func (*Repository) RoleRemoveActions

func (_m *Repository) RoleRemoveActions(ctx context.Context, role roles.Role, actions []string) error

RoleRemoveActions provides a mock function with given fields: ctx, role, actions

func (*Repository) RoleRemoveAllActions

func (_m *Repository) RoleRemoveAllActions(ctx context.Context, role roles.Role) error

RoleRemoveAllActions provides a mock function with given fields: ctx, role

func (*Repository) RoleRemoveAllMembers

func (_m *Repository) RoleRemoveAllMembers(ctx context.Context, role roles.Role) error

RoleRemoveAllMembers provides a mock function with given fields: ctx, role

func (*Repository) RoleRemoveMembers

func (_m *Repository) RoleRemoveMembers(ctx context.Context, role roles.Role, members []string) error

RoleRemoveMembers provides a mock function with given fields: ctx, role, members

func (*Repository) Save

func (_m *Repository) Save(ctx context.Context, chs ...channels.Channel) ([]channels.Channel, error)

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

func (*Repository) SetParentGroup

func (_m *Repository) SetParentGroup(ctx context.Context, ch channels.Channel) error

SetParentGroup provides a mock function with given fields: ctx, ch

func (*Repository) UnsetParentGroupFromChannels

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

UnsetParentGroupFromChannels provides a mock function with given fields: ctx, parentGroupID

func (*Repository) Update

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

func (*Repository) UpdateRole

func (_m *Repository) UpdateRole(ctx context.Context, ro roles.Role) (roles.Role, error)

UpdateRole provides a mock function with given fields: ctx, ro

func (*Repository) UpdateTags

func (_m *Repository) UpdateTags(ctx context.Context, ch channels.Channel) (channels.Channel, error)

UpdateTags provides a mock function with given fields: ctx, ch

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

func (_m *Service) AddRole(ctx context.Context, session authn.Session, entityID string, roleName string, optionalActions []string, optionalMembers []string) (roles.Role, error)

AddRole provides a mock function with given fields: ctx, session, entityID, roleName, optionalActions, optionalMembers

func (*Service) Connect

func (_m *Service) Connect(ctx context.Context, session authn.Session, chIDs []string, clIDs []string, connType []connections.ConnType) error

Connect provides a mock function with given fields: ctx, session, chIDs, clIDs, connType

func (*Service) CreateChannels

func (_m *Service) CreateChannels(ctx context.Context, session authn.Session, _a2 ...channels.Channel) ([]channels.Channel, error)

CreateChannels provides a mock function with given fields: ctx, session, _a2

func (*Service) DisableChannel

func (_m *Service) DisableChannel(ctx context.Context, session authn.Session, id string) (channels.Channel, error)

DisableChannel provides a mock function with given fields: ctx, session, id

func (*Service) Disconnect

func (_m *Service) Disconnect(ctx context.Context, session authn.Session, chIDs []string, clIDs []string, connType []connections.ConnType) error

Disconnect provides a mock function with given fields: ctx, session, chIDs, clIDs, connType

func (*Service) EnableChannel

func (_m *Service) EnableChannel(ctx context.Context, session authn.Session, id string) (channels.Channel, error)

EnableChannel provides a mock function with given fields: ctx, session, id

func (*Service) ListAvailableActions

func (_m *Service) ListAvailableActions(ctx context.Context, session authn.Session) ([]string, error)

ListAvailableActions provides a mock function with given fields: ctx, session

func (*Service) ListChannels

func (_m *Service) ListChannels(ctx context.Context, session authn.Session, pm channels.PageMetadata) (channels.Page, error)

ListChannels provides a mock function with given fields: ctx, session, pm

func (*Service) ListChannelsByClient

func (_m *Service) ListChannelsByClient(ctx context.Context, session authn.Session, id string, pm channels.PageMetadata) (channels.Page, error)

ListChannelsByClient provides a mock function with given fields: ctx, session, id, pm

func (*Service) RemoveChannel

func (_m *Service) RemoveChannel(ctx context.Context, session authn.Session, id string) error

RemoveChannel provides a mock function with given fields: ctx, session, id

func (*Service) RemoveMemberFromAllRoles

func (_m *Service) RemoveMemberFromAllRoles(ctx context.Context, session authn.Session, memberID string) error

RemoveMemberFromAllRoles provides a mock function with given fields: ctx, session, memberID

func (*Service) RemoveParentGroup

func (_m *Service) RemoveParentGroup(ctx context.Context, session authn.Session, id string) error

RemoveParentGroup provides a mock function with given fields: ctx, session, id

func (*Service) RemoveRole

func (_m *Service) RemoveRole(ctx context.Context, session authn.Session, entityID string, roleName string) error

RemoveRole provides a mock function with given fields: ctx, session, entityID, roleName

func (*Service) RetrieveAllRoles

func (_m *Service) RetrieveAllRoles(ctx context.Context, session authn.Session, entityID string, limit uint64, offset uint64) (roles.RolePage, error)

RetrieveAllRoles provides a mock function with given fields: ctx, session, entityID, limit, offset

func (*Service) RetrieveRole

func (_m *Service) RetrieveRole(ctx context.Context, session authn.Session, entityID string, roleName string) (roles.Role, error)

RetrieveRole provides a mock function with given fields: ctx, session, entityID, roleName

func (*Service) RoleAddActions

func (_m *Service) RoleAddActions(ctx context.Context, session authn.Session, entityID string, roleName string, actions []string) ([]string, error)

RoleAddActions provides a mock function with given fields: ctx, session, entityID, roleName, actions

func (*Service) RoleAddMembers

func (_m *Service) RoleAddMembers(ctx context.Context, session authn.Session, entityID string, roleName string, members []string) ([]string, error)

RoleAddMembers provides a mock function with given fields: ctx, session, entityID, roleName, members

func (*Service) RoleCheckActionsExists

func (_m *Service) RoleCheckActionsExists(ctx context.Context, session authn.Session, entityID string, roleName string, actions []string) (bool, error)

RoleCheckActionsExists provides a mock function with given fields: ctx, session, entityID, roleName, actions

func (*Service) RoleCheckMembersExists

func (_m *Service) RoleCheckMembersExists(ctx context.Context, session authn.Session, entityID string, roleName string, members []string) (bool, error)

RoleCheckMembersExists provides a mock function with given fields: ctx, session, entityID, roleName, members

func (*Service) RoleListActions

func (_m *Service) RoleListActions(ctx context.Context, session authn.Session, entityID string, roleName string) ([]string, error)

RoleListActions provides a mock function with given fields: ctx, session, entityID, roleName

func (*Service) RoleListMembers

func (_m *Service) RoleListMembers(ctx context.Context, session authn.Session, entityID string, roleName string, limit uint64, offset uint64) (roles.MembersPage, error)

RoleListMembers provides a mock function with given fields: ctx, session, entityID, roleName, limit, offset

func (*Service) RoleRemoveActions

func (_m *Service) RoleRemoveActions(ctx context.Context, session authn.Session, entityID string, roleName string, actions []string) error

RoleRemoveActions provides a mock function with given fields: ctx, session, entityID, roleName, actions

func (*Service) RoleRemoveAllActions

func (_m *Service) RoleRemoveAllActions(ctx context.Context, session authn.Session, entityID string, roleName string) error

RoleRemoveAllActions provides a mock function with given fields: ctx, session, entityID, roleName

func (*Service) RoleRemoveAllMembers

func (_m *Service) RoleRemoveAllMembers(ctx context.Context, session authn.Session, entityID string, roleName string) error

RoleRemoveAllMembers provides a mock function with given fields: ctx, session, entityID, roleName

func (*Service) RoleRemoveMembers

func (_m *Service) RoleRemoveMembers(ctx context.Context, session authn.Session, entityID string, roleName string, members []string) error

RoleRemoveMembers provides a mock function with given fields: ctx, session, entityID, roleName, members

func (*Service) SetParentGroup

func (_m *Service) SetParentGroup(ctx context.Context, session authn.Session, parentGroupID string, id string) error

SetParentGroup provides a mock function with given fields: ctx, session, parentGroupID, id

func (*Service) UpdateChannel

func (_m *Service) UpdateChannel(ctx context.Context, session authn.Session, channel channels.Channel) (channels.Channel, error)

UpdateChannel provides a mock function with given fields: ctx, session, channel

func (*Service) UpdateChannelTags

func (_m *Service) UpdateChannelTags(ctx context.Context, session authn.Session, channel channels.Channel) (channels.Channel, error)

UpdateChannelTags provides a mock function with given fields: ctx, session, channel

func (*Service) UpdateRoleName

func (_m *Service) UpdateRoleName(ctx context.Context, session authn.Session, entityID string, oldRoleName string, newRoleName string) (roles.Role, error)

UpdateRoleName provides a mock function with given fields: ctx, session, entityID, oldRoleName, newRoleName

func (*Service) ViewChannel

func (_m *Service) ViewChannel(ctx context.Context, session authn.Session, id string) (channels.Channel, error)

ViewChannel provides a mock function with given fields: ctx, session, id

Jump to

Keyboard shortcuts

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