Documentation ¶
Overview ¶
Package serviceaccount package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateTokenInput ¶ added in v0.2.0
type CreateTokenInput struct { // ServiceAccount ID or resource path ServiceAccount string Token []byte }
CreateTokenInput for logging into a service account
type CreateTokenResponse ¶ added in v0.2.0
CreateTokenResponse returned after logging into a service account
type GetServiceAccountsInput ¶
type GetServiceAccountsInput struct { // Sort specifies the field to sort on and direction Sort *db.ServiceAccountSortableField // PaginationOptions supports cursor based pagination PaginationOptions *pagination.Options // Search returns only the service accounts with a name or resource path that starts with the value of search Search *string // RunnerID will filter service accounts that are assigned to the specified runner RunnerID *string // NamespacePath is the namespace to return service accounts for NamespacePath string // IncludeInherited includes inherited services accounts in the result IncludeInherited bool }
GetServiceAccountsInput is the input for querying a list of service accounts
type Service ¶
type Service interface { GetServiceAccountByPath(ctx context.Context, path string) (*models.ServiceAccount, error) GetServiceAccountByID(ctx context.Context, id string) (*models.ServiceAccount, error) GetServiceAccounts(ctx context.Context, input *GetServiceAccountsInput) (*db.ServiceAccountsResult, error) GetServiceAccountsByIDs(ctx context.Context, idList []string) ([]models.ServiceAccount, error) CreateServiceAccount(ctx context.Context, input *models.ServiceAccount) (*models.ServiceAccount, error) UpdateServiceAccount(ctx context.Context, serviceAccount *models.ServiceAccount) (*models.ServiceAccount, error) DeleteServiceAccount(ctx context.Context, serviceAccount *models.ServiceAccount) error CreateToken(ctx context.Context, input *CreateTokenInput) (*CreateTokenResponse, error) }
Service implements all service account related functionality
func NewService ¶
func NewService( logger logger.Logger, dbClient *db.Client, limitChecker limits.LimitChecker, idp *auth.IdentityProvider, openIDConfigFetcher *auth.OpenIDConfigFetcher, activityService activityevent.Service, ) Service
NewService creates an instance of Service
Click to show internal directories.
Click to hide internal directories.