Documentation ¶
Index ¶
- func SetupApiKey(t *testing.T, sqlStore *sqlstore.SQLStore, testKey TestApiKey) *apikey.APIKey
- func SetupMockAccesscontrol(t *testing.T, ...) *accesscontrolmock.Mock
- func SetupUserServiceAccount(t *testing.T, sqlStore *sqlstore.SQLStore, testUser TestUser) *user.User
- type MockServiceAccountService
- func (s *MockServiceAccountService) AddServiceAccountToken(ctx context.Context, serviceAccountID int64, ...) (*apikey.APIKey, error)
- func (s *MockServiceAccountService) CreateServiceAccount(ctx context.Context, orgID int64, ...) (*serviceaccounts.ServiceAccountDTO, error)
- func (s *MockServiceAccountService) DeleteServiceAccount(ctx context.Context, orgID int64, serviceAccountID int64) error
- func (s *MockServiceAccountService) RetrieveServiceAccount(ctx context.Context, orgID int64, serviceAccountID int64) (*serviceaccounts.ServiceAccountProfileDTO, error)
- func (s *MockServiceAccountService) RetrieveServiceAccountIdByName(ctx context.Context, orgID int64, name string) (int64, error)
- func (s *MockServiceAccountService) UpdateServiceAccount(ctx context.Context, orgID int64, serviceAccountID int64, ...) (*serviceaccounts.ServiceAccountProfileDTO, error)
- type TestApiKey
- type TestUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupApiKey ¶
func SetupMockAccesscontrol ¶
func SetupMockAccesscontrol(t *testing.T, userpermissionsfunc func(c context.Context, siu *user.SignedInUser, opt accesscontrol.Options) ([]accesscontrol.Permission, error), disableAccessControl bool) *accesscontrolmock.Mock
Types ¶
type MockServiceAccountService ¶
func (*MockServiceAccountService) AddServiceAccountToken ¶
func (s *MockServiceAccountService) AddServiceAccountToken(ctx context.Context, serviceAccountID int64, cmd *serviceaccounts.AddServiceAccountTokenCommand) (*apikey.APIKey, error)
AddServiceAccountToken implements serviceaccounts.Service
func (*MockServiceAccountService) CreateServiceAccount ¶
func (s *MockServiceAccountService) CreateServiceAccount(ctx context.Context, orgID int64, saForm *serviceaccounts.CreateServiceAccountForm) (*serviceaccounts.ServiceAccountDTO, error)
CreateServiceAccount implements serviceaccounts.Service
func (*MockServiceAccountService) DeleteServiceAccount ¶
func (s *MockServiceAccountService) DeleteServiceAccount(ctx context.Context, orgID int64, serviceAccountID int64) error
DeleteServiceAccount implements serviceaccounts.Service
func (*MockServiceAccountService) RetrieveServiceAccount ¶
func (s *MockServiceAccountService) RetrieveServiceAccount(ctx context.Context, orgID int64, serviceAccountID int64) (*serviceaccounts.ServiceAccountProfileDTO, error)
RetrieveServiceAccount implements serviceaccounts.Service
func (*MockServiceAccountService) RetrieveServiceAccountIdByName ¶
func (s *MockServiceAccountService) RetrieveServiceAccountIdByName(ctx context.Context, orgID int64, name string) (int64, error)
RetrieveServiceAccountIdByName implements serviceaccounts.Service
func (*MockServiceAccountService) UpdateServiceAccount ¶
func (s *MockServiceAccountService) UpdateServiceAccount(ctx context.Context, orgID int64, serviceAccountID int64, saForm *serviceaccounts.UpdateServiceAccountForm) (*serviceaccounts.ServiceAccountProfileDTO, error)
UpdateServiceAccount implements serviceaccounts.Service
type TestApiKey ¶
Click to show internal directories.
Click to hide internal directories.