mocks

package
v0.0.0-...-18bb2fd Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPubAckFuture

type MockPubAckFuture struct {
	mock.Mock
}

func (*MockPubAckFuture) Err

func (m *MockPubAckFuture) Err() <-chan error

func (*MockPubAckFuture) Msg

func (m *MockPubAckFuture) Msg() *nats.Msg

func (*MockPubAckFuture) Ok

func (m *MockPubAckFuture) Ok() <-chan *nats.PubAck

type TestFGAAuthorizer

type TestFGAAuthorizer struct {
	mock.Mock
}

func (*TestFGAAuthorizer) AddAccountToOrganization

func (t *TestFGAAuthorizer) AddAccountToOrganization(ctx context.Context, accountID uuid.UUID) error

func (*TestFGAAuthorizer) AddOrganizationalUnit

func (t *TestFGAAuthorizer) AddOrganizationalUnit(ctx context.Context, id uuid.UUID, parentID uuid.NullUUID) error

func (*TestFGAAuthorizer) AddUserToOrganization

func (t *TestFGAAuthorizer) AddUserToOrganization(ctx context.Context, userID uuid.UUID) error

func (*TestFGAAuthorizer) AddUsersToGroup

func (t *TestFGAAuthorizer) AddUsersToGroup(ctx context.Context, userIDs []uuid.UUID, groupID uuid.UUID) error

func (*TestFGAAuthorizer) Check

func (t *TestFGAAuthorizer) Check(ctx context.Context, callerID uuid.UUID, relation fga.Relation, document fga.Document, objectID string) (bool, error)

func (*TestFGAAuthorizer) CheckAccountAlreadyExistsInOrganization

func (t *TestFGAAuthorizer) CheckAccountAlreadyExistsInOrganization(ctx context.Context, accountID uuid.UUID) (bool, error)

func (*TestFGAAuthorizer) CheckOrganizationalUnitRelationship

func (t *TestFGAAuthorizer) CheckOrganizationalUnitRelationship(ctx context.Context, id uuid.UUID, parentID uuid.NullUUID) (bool, error)

func (*TestFGAAuthorizer) CheckUserAlreadyExistsInGroup

func (t *TestFGAAuthorizer) CheckUserAlreadyExistsInGroup(ctx context.Context, userID, groupID uuid.UUID) (bool, error)

func (*TestFGAAuthorizer) CheckUserAlreadyExistsInOrganization

func (t *TestFGAAuthorizer) CheckUserAlreadyExistsInOrganization(ctx context.Context, userID uuid.UUID) (bool, error)

func (*TestFGAAuthorizer) RemoveOrganizationalUnitRelationships

func (t *TestFGAAuthorizer) RemoveOrganizationalUnitRelationships(ctx context.Context, id uuid.UUID, parentID uuid.NullUUID) error

func (*TestFGAAuthorizer) RemoveUser

func (t *TestFGAAuthorizer) RemoveUser(ctx context.Context, userID uuid.UUID) error

func (*TestFGAAuthorizer) RemoveUserFromGroup

func (t *TestFGAAuthorizer) RemoveUserFromGroup(ctx context.Context, userID uuid.UUID, groupID uuid.UUID) error

func (*TestFGAAuthorizer) RemoveUserFromOrganization

func (t *TestFGAAuthorizer) RemoveUserFromOrganization(ctx context.Context, userID uuid.UUID) error

func (*TestFGAAuthorizer) RemoveUsersInGroup

func (t *TestFGAAuthorizer) RemoveUsersInGroup(ctx context.Context, groupID uuid.UUID) error

func (*TestFGAAuthorizer) ReplaceUsersInGroup

func (t *TestFGAAuthorizer) ReplaceUsersInGroup(ctx context.Context, userIDs []uuid.UUID, groupID uuid.UUID) error

func (*TestFGAAuthorizer) RunAssertions

func (t *TestFGAAuthorizer) RunAssertions(ctx context.Context, typeDefinitionsContent string) (bool, error)

func (*TestFGAAuthorizer) SetTypeDefinitions

func (t *TestFGAAuthorizer) SetTypeDefinitions(ctx context.Context, authorizationModelID string) (string, error)

func (*TestFGAAuthorizer) UserTuples

func (t *TestFGAAuthorizer) UserTuples(ctx context.Context, userID uuid.UUID, document string) ([]openfga.TupleKey, error)

func (*TestFGAAuthorizer) WriteAssertions

func (t *TestFGAAuthorizer) WriteAssertions(ctx context.Context, authorizationModelID string, assertions []openfga.Assertion) error

func (*TestFGAAuthorizer) WriteTuples

func (t *TestFGAAuthorizer) WriteTuples(ctx context.Context, tuples []openfga.TupleKey) error

type TestJS

type TestJS struct {
	mock.Mock
}

func (*TestJS) AccountInfo

func (t *TestJS) AccountInfo(opts ...nats.JSOpt) (*nats.AccountInfo, error)

func (*TestJS) AddConsumer

func (t *TestJS) AddConsumer(stream string, cfg *nats.ConsumerConfig, opts ...nats.JSOpt) (*nats.ConsumerInfo, error)

func (*TestJS) AddStream

func (t *TestJS) AddStream(cfg *nats.StreamConfig, opts ...nats.JSOpt) (*nats.StreamInfo, error)

func (*TestJS) ChanQueueSubscribe

func (t *TestJS) ChanQueueSubscribe(subj,
	queue string,
	ch chan *nats.Msg,
	opts ...nats.SubOpt,
) (*nats.Subscription, error)

func (*TestJS) ChanSubscribe

func (t *TestJS) ChanSubscribe(subj string, ch chan *nats.Msg, opts ...nats.SubOpt) (*nats.Subscription, error)

func (*TestJS) ConsumerInfo

func (t *TestJS) ConsumerInfo(stream, name string, opts ...nats.JSOpt) (*nats.ConsumerInfo, error)

func (*TestJS) ConsumerNames

func (t *TestJS) ConsumerNames(stream string, opts ...nats.JSOpt) <-chan string

func (*TestJS) Consumers

func (t *TestJS) Consumers(stream string, opts ...nats.JSOpt) <-chan *nats.ConsumerInfo

func (*TestJS) ConsumersInfo

func (t *TestJS) ConsumersInfo(stream string, opts ...nats.JSOpt) <-chan *nats.ConsumerInfo

func (*TestJS) CreateKeyValue

func (t *TestJS) CreateKeyValue(cfg *nats.KeyValueConfig) (nats.KeyValue, error)

func (*TestJS) CreateObjectStore

func (t *TestJS) CreateObjectStore(cfg *nats.ObjectStoreConfig) (nats.ObjectStore, error)

func (*TestJS) DeleteConsumer

func (t *TestJS) DeleteConsumer(stream, consumer string, opts ...nats.JSOpt) error

func (*TestJS) DeleteKeyValue

func (t *TestJS) DeleteKeyValue(bucket string) error

func (*TestJS) DeleteMsg

func (t *TestJS) DeleteMsg(name string, seq uint64, opts ...nats.JSOpt) error

func (*TestJS) DeleteObjectStore

func (t *TestJS) DeleteObjectStore(bucket string) error

func (*TestJS) DeleteStream

func (t *TestJS) DeleteStream(name string, opts ...nats.JSOpt) error

func (*TestJS) GetLastMsg

func (t *TestJS) GetLastMsg(name, subject string, opts ...nats.JSOpt) (*nats.RawStreamMsg, error)

func (*TestJS) GetMsg

func (t *TestJS) GetMsg(name string, seq uint64, opts ...nats.JSOpt) (*nats.RawStreamMsg, error)

func (*TestJS) KeyValue

func (t *TestJS) KeyValue(bucket string) (nats.KeyValue, error)

func (*TestJS) KeyValueStoreNames

func (t *TestJS) KeyValueStoreNames() <-chan string

func (*TestJS) KeyValueStores

func (t *TestJS) KeyValueStores() <-chan nats.KeyValueStatus

func (*TestJS) ObjectStore

func (t *TestJS) ObjectStore(bucket string) (nats.ObjectStore, error)

func (*TestJS) ObjectStoreNames

func (t *TestJS) ObjectStoreNames(opts ...nats.ObjectOpt) <-chan string

func (*TestJS) ObjectStores

func (t *TestJS) ObjectStores(opts ...nats.ObjectOpt) <-chan nats.ObjectStoreStatus

func (*TestJS) Publish

func (t *TestJS) Publish(subj string, data []byte, opts ...nats.PubOpt) (*nats.PubAck, error)

func (*TestJS) PublishAsync

func (t *TestJS) PublishAsync(subj string, data []byte, opts ...nats.PubOpt) (nats.PubAckFuture, error)

func (*TestJS) PublishAsyncComplete

func (t *TestJS) PublishAsyncComplete() <-chan struct{}

func (*TestJS) PublishAsyncPending

func (t *TestJS) PublishAsyncPending() int

func (*TestJS) PublishMsg

func (t *TestJS) PublishMsg(m *nats.Msg, opts ...nats.PubOpt) (*nats.PubAck, error)

func (*TestJS) PublishMsgAsync

func (t *TestJS) PublishMsgAsync(m *nats.Msg, opts ...nats.PubOpt) (nats.PubAckFuture, error)

func (*TestJS) PullSubscribe

func (t *TestJS) PullSubscribe(subj, durable string, opts ...nats.SubOpt) (*nats.Subscription, error)

func (*TestJS) PurgeStream

func (t *TestJS) PurgeStream(name string, opts ...nats.JSOpt) error

func (*TestJS) QueueSubscribe

func (t *TestJS) QueueSubscribe(subj, queue string,
	cb nats.MsgHandler,
	opts ...nats.SubOpt,
) (*nats.Subscription, error)

func (*TestJS) QueueSubscribeSync

func (t *TestJS) QueueSubscribeSync(subj, queue string, opts ...nats.SubOpt) (*nats.Subscription, error)

func (*TestJS) SecureDeleteMsg

func (t *TestJS) SecureDeleteMsg(name string, seq uint64, opts ...nats.JSOpt) error

func (*TestJS) StreamInfo

func (t *TestJS) StreamInfo(stream string, opts ...nats.JSOpt) (*nats.StreamInfo, error)

func (*TestJS) StreamNameBySubject

func (t *TestJS) StreamNameBySubject(s string, opt ...nats.JSOpt) (string, error)

func (*TestJS) StreamNames

func (t *TestJS) StreamNames(opts ...nats.JSOpt) <-chan string

func (*TestJS) Streams

func (t *TestJS) Streams(opts ...nats.JSOpt) <-chan *nats.StreamInfo

func (*TestJS) StreamsInfo

func (t *TestJS) StreamsInfo(opts ...nats.JSOpt) <-chan *nats.StreamInfo

func (*TestJS) Subscribe

func (t *TestJS) Subscribe(subj string, cb nats.MsgHandler, opts ...nats.SubOpt) (*nats.Subscription, error)

func (*TestJS) SubscribeSync

func (t *TestJS) SubscribeSync(subj string, opts ...nats.SubOpt) (*nats.Subscription, error)

func (*TestJS) UpdateConsumer

func (t *TestJS) UpdateConsumer(stream string,
	cfg *nats.ConsumerConfig,
	opts ...nats.JSOpt,
) (*nats.ConsumerInfo, error)

func (*TestJS) UpdateStream

func (t *TestJS) UpdateStream(cfg *nats.StreamConfig, opts ...nats.JSOpt) (*nats.StreamInfo, error)

type TestRepo

type TestRepo struct {
	mock.Mock
}

func (*TestRepo) AssignAccountToOU

func (t *TestRepo) AssignAccountToOU(ctx context.Context, arg db.AssignAccountToOUParams) error

func (*TestRepo) CreateAuditLog

func (t *TestRepo) CreateAuditLog(ctx context.Context, arg db.CreateAuditLogParams) (db.AuditLog, error)

func (*TestRepo) CreateGroup

func (t *TestRepo) CreateGroup(ctx context.Context, displayName string) (db.Group, error)

func (*TestRepo) CreateMembershipForUserAndGroup

func (t *TestRepo) CreateMembershipForUserAndGroup(ctx context.Context, arg db.CreateMembershipForUserAndGroupParams) error

func (*TestRepo) CreateOrUpdateCloudAccount

func (t *TestRepo) CreateOrUpdateCloudAccount(ctx context.Context, arg db.CreateOrUpdateCloudAccountParams) (db.CloudAccount, error)

func (*TestRepo) CreateOrUpdateCloudTenant

func (t *TestRepo) CreateOrUpdateCloudTenant(ctx context.Context, arg db.CreateOrUpdateCloudTenantParams) (db.CloudTenant, error)

func (*TestRepo) CreateOrganizationalUnit

func (t *TestRepo) CreateOrganizationalUnit(ctx context.Context, arg db.CreateOrganizationalUnitParams) (db.OrganizationalUnit, error)

func (*TestRepo) CreateTag

func (t *TestRepo) CreateTag(ctx context.Context, arg db.CreateTagParams) (db.StandardTag, error)

func (*TestRepo) CreateUser

func (t *TestRepo) CreateUser(ctx context.Context, arg db.CreateUserParams) (db.User, error)

func (*TestRepo) DeleteAPIKey

func (t *TestRepo) DeleteAPIKey(ctx context.Context, id uuid.UUID) error

func (*TestRepo) DeleteGroup

func (t *TestRepo) DeleteGroup(ctx context.Context, id uuid.UUID) error

func (*TestRepo) DeleteOrganizationalUnit

func (t *TestRepo) DeleteOrganizationalUnit(ctx context.Context, id uuid.UUID) error

func (*TestRepo) DeleteScimAPIKey

func (t *TestRepo) DeleteScimAPIKey(ctx context.Context) error

func (*TestRepo) DeleteTag

func (t *TestRepo) DeleteTag(ctx context.Context, id uuid.UUID) error

func (*TestRepo) DeleteUser

func (t *TestRepo) DeleteUser(ctx context.Context, id uuid.UUID) error

func (*TestRepo) DropMembershipForGroup

func (t *TestRepo) DropMembershipForGroup(ctx context.Context, groupID uuid.UUID) error

func (*TestRepo) DropMembershipForUserAndGroup

func (t *TestRepo) DropMembershipForUserAndGroup(ctx context.Context, arg db.DropMembershipForUserAndGroupParams) error

func (*TestRepo) FindAPIKey

func (t *TestRepo) FindAPIKey(ctx context.Context, id uuid.UUID) (db.ApiKey, error)

func (*TestRepo) FindAPIKeysByID

func (t *TestRepo) FindAPIKeysByID(ctx context.Context, id []uuid.UUID) ([]db.ApiKey, error)

func (*TestRepo) FindCloudAccount

func (t *TestRepo) FindCloudAccount(ctx context.Context, id uuid.UUID) (db.CloudAccount, error)

func (*TestRepo) FindCloudAccountByCloudAndTenant

func (t *TestRepo) FindCloudAccountByCloudAndTenant(ctx context.Context, arg db.FindCloudAccountByCloudAndTenantParams) (db.CloudAccount, error)

func (*TestRepo) FindOrganizationalUnit

func (t *TestRepo) FindOrganizationalUnit(ctx context.Context, id uuid.UUID) (db.OrganizationalUnit, error)

func (*TestRepo) FindScimAPIKey

func (t *TestRepo) FindScimAPIKey(ctx context.Context) (db.ApiKey, error)

func (*TestRepo) FindTag

func (t *TestRepo) FindTag(ctx context.Context, id uuid.UUID) (db.StandardTag, error)

func (*TestRepo) FindUserByUsername

func (t *TestRepo) FindUserByUsername(ctx context.Context, username string) (db.User, error)

func (*TestRepo) GetAPIKeys

func (t *TestRepo) GetAPIKeys(ctx context.Context) ([]db.ApiKey, error)

func (*TestRepo) GetAPIKeysOrganizationalUnits

func (t *TestRepo) GetAPIKeysOrganizationalUnits(ctx context.Context, apiKeyID uuid.UUID) ([]db.OrganizationalUnit, error)

func (*TestRepo) GetAuditLogs

func (t *TestRepo) GetAuditLogs(ctx context.Context) ([]db.AuditLog, error)

func (*TestRepo) GetAuditLogsForTarget

func (t *TestRepo) GetAuditLogsForTarget(ctx context.Context, arg db.GetAuditLogsForTargetParams) ([]db.AuditLog, error)

func (*TestRepo) GetCloudTenant

func (t *TestRepo) GetCloudTenant(ctx context.Context, arg db.GetCloudTenantParams) (db.CloudTenant, error)

func (*TestRepo) GetCloudTenants

func (t *TestRepo) GetCloudTenants(ctx context.Context) ([]db.CloudTenant, error)

func (*TestRepo) GetGroup

func (t *TestRepo) GetGroup(ctx context.Context, id uuid.UUID) (db.Group, error)

func (*TestRepo) GetGroupCount

func (t *TestRepo) GetGroupCount(ctx context.Context) (int64, error)

func (*TestRepo) GetGroupMembership

func (t *TestRepo) GetGroupMembership(ctx context.Context, groupID uuid.UUID) ([]db.GetGroupMembershipRow, error)

func (*TestRepo) GetGroups

func (t *TestRepo) GetGroups(ctx context.Context, arg db.GetGroupsParams) ([]db.Group, error)

func (*TestRepo) GetOrganizationalUnitChildren

func (t *TestRepo) GetOrganizationalUnitChildren(ctx context.Context, parentID uuid.UUID) ([]db.OrganizationalUnit, error)

func (*TestRepo) GetOrganizationalUnitCloudAccounts

func (t *TestRepo) GetOrganizationalUnitCloudAccounts(ctx context.Context, organizationalUnitID uuid.UUID) ([]db.CloudAccount, error)

func (*TestRepo) GetOrganizationalUnits

func (t *TestRepo) GetOrganizationalUnits(ctx context.Context) ([]db.OrganizationalUnit, error)

func (*TestRepo) GetTags

func (t *TestRepo) GetTags(ctx context.Context) ([]db.StandardTag, error)

func (*TestRepo) GetUser

func (t *TestRepo) GetUser(ctx context.Context, id uuid.UUID) (db.User, error)

func (*TestRepo) GetUserCount

func (t *TestRepo) GetUserCount(ctx context.Context) (int64, error)

func (*TestRepo) GetUserOrganizationalUnits

func (t *TestRepo) GetUserOrganizationalUnits(ctx context.Context, userID uuid.UUID) ([]db.OrganizationalUnit, error)

func (*TestRepo) GetUsers

func (t *TestRepo) GetUsers(ctx context.Context, arg db.GetUsersParams) ([]db.User, error)

func (*TestRepo) GetUsersByID

func (t *TestRepo) GetUsersByID(ctx context.Context, userIDs []uuid.UUID) ([]db.User, error)

func (*TestRepo) InsertAPIKey

func (t *TestRepo) InsertAPIKey(ctx context.Context, arg db.InsertAPIKeyParams) (db.ApiKey, error)

func (*TestRepo) InsertScimAPIKey

func (t *TestRepo) InsertScimAPIKey(ctx context.Context, apiKeyID uuid.UUID) (db.ScimApiKey, error)

func (*TestRepo) OrganizationalUnitsCloudAccounts

func (t *TestRepo) OrganizationalUnitsCloudAccounts(ctx context.Context, id []uuid.UUID) ([]db.CloudAccount, error)

func (*TestRepo) PatchGroupDisplayName

func (t *TestRepo) PatchGroupDisplayName(ctx context.Context, arg db.PatchGroupDisplayNameParams) error

func (*TestRepo) PatchUser

func (t *TestRepo) PatchUser(ctx context.Context, arg db.PatchUserParams) error

func (*TestRepo) SearchTag

func (t *TestRepo) SearchTag(ctx context.Context, arg db.SearchTagParams) ([]db.CloudAccount, error)

func (*TestRepo) UnAssignAccountFromOUs

func (t *TestRepo) UnAssignAccountFromOUs(ctx context.Context, cloudAccountID uuid.UUID) error

func (*TestRepo) UpdateCloudAccount

func (t *TestRepo) UpdateCloudAccount(ctx context.Context, arg db.UpdateCloudAccountParams) error

func (*TestRepo) UpdateCloudAccountTagsDriftDetected

func (t *TestRepo) UpdateCloudAccountTagsDriftDetected(ctx context.Context, arg db.UpdateCloudAccountTagsDriftDetectedParams) error

func (*TestRepo) UpdateTag

func (t *TestRepo) UpdateTag(ctx context.Context, arg db.UpdateTagParams) (db.StandardTag, error)

func (*TestRepo) UpdateUser

func (t *TestRepo) UpdateUser(ctx context.Context, arg db.UpdateUserParams) (db.User, error)

func (*TestRepo) WithTx

func (t *TestRepo) WithTx(tx pgx.Tx) db.Repository

type TestSearcher

type TestSearcher struct {
	mock.Mock
}

func (*TestSearcher) SearchCloudAccounts

func (t *TestSearcher) SearchCloudAccounts(ctx context.Context, input db.SearchCloudAccountsInput) ([]db.CloudAccount, error)

Jump to

Keyboard shortcuts

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