Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterRoles(service accesscontrol.Service) error
- type ServiceAccountsService
- func (sa *ServiceAccountsService) AddServiceAccountToken(ctx context.Context, serviceAccountID int64, ...) (*apikey.APIKey, error)
- func (sa *ServiceAccountsService) CreateServiceAccount(ctx context.Context, orgID int64, ...) (*serviceaccounts.ServiceAccountDTO, error)
- func (sa *ServiceAccountsService) DeleteServiceAccount(ctx context.Context, orgID, serviceAccountID int64) error
- func (sa *ServiceAccountsService) DeleteServiceAccountToken(ctx context.Context, orgID, serviceAccountID int64, tokenID int64) error
- func (sa *ServiceAccountsService) ListTokens(ctx context.Context, query *serviceaccounts.GetSATokensQuery) ([]apikey.APIKey, error)
- func (sa *ServiceAccountsService) MigrateApiKey(ctx context.Context, orgID, keyID int64) error
- func (sa *ServiceAccountsService) MigrateApiKeysToServiceAccounts(ctx context.Context, orgID int64) (*serviceaccounts.MigrationResult, error)
- func (sa *ServiceAccountsService) RetrieveServiceAccount(ctx context.Context, orgID int64, serviceAccountID int64) (*serviceaccounts.ServiceAccountProfileDTO, error)
- func (sa *ServiceAccountsService) RetrieveServiceAccountIdByName(ctx context.Context, orgID int64, name string) (int64, error)
- func (sa *ServiceAccountsService) Run(ctx context.Context) error
- func (sa *ServiceAccountsService) SearchOrgServiceAccounts(ctx context.Context, query *serviceaccounts.SearchOrgServiceAccountsQuery) (*serviceaccounts.SearchOrgServiceAccountsResult, error)
- func (sa *ServiceAccountsService) UpdateServiceAccount(ctx context.Context, orgID int64, serviceAccountID int64, ...) (*serviceaccounts.ServiceAccountProfileDTO, error)
Constants ¶
View Source
const (
ExporterName = "grafana"
)
Variables ¶
View Source
var ( // MStatTotalServiceAccounts is a metric gauge for total number of service accounts MStatTotalServiceAccounts prometheus.Gauge // MStatTotalServiceAccountsNoRole is a metric gauge for total number of user accounts with no role MStatTotalServiceAccountsNoRole prometheus.Gauge // MStatTotalServiceAccountTokens is a metric gauge for total number of service account tokens MStatTotalServiceAccountTokens prometheus.Gauge Initialised bool = false )
Functions ¶
func RegisterRoles ¶
func RegisterRoles(service accesscontrol.Service) error
Types ¶
type ServiceAccountsService ¶
type ServiceAccountsService struct {
// contains filtered or unexported fields
}
func ProvideServiceAccountsService ¶
func ProvideServiceAccountsService( cfg *setting.Cfg, ac accesscontrol.AccessControl, routeRegister routing.RouteRegister, usageStats usagestats.Service, store *sqlstore.SQLStore, apiKeyService apikey.Service, kvStore kvstore.KVStore, userService user.Service, orgService org.Service, permissionService accesscontrol.ServiceAccountPermissionsService, accesscontrolService accesscontrol.Service, ) (*ServiceAccountsService, error)
func (*ServiceAccountsService) AddServiceAccountToken ¶
func (sa *ServiceAccountsService) AddServiceAccountToken(ctx context.Context, serviceAccountID int64, query *serviceaccounts.AddServiceAccountTokenCommand) (*apikey.APIKey, error)
func (*ServiceAccountsService) CreateServiceAccount ¶
func (sa *ServiceAccountsService) CreateServiceAccount(ctx context.Context, orgID int64, saForm *serviceaccounts.CreateServiceAccountForm) (*serviceaccounts.ServiceAccountDTO, error)
func (*ServiceAccountsService) DeleteServiceAccount ¶
func (sa *ServiceAccountsService) DeleteServiceAccount(ctx context.Context, orgID, serviceAccountID int64) error
func (*ServiceAccountsService) DeleteServiceAccountToken ¶
func (*ServiceAccountsService) ListTokens ¶
func (sa *ServiceAccountsService) ListTokens(ctx context.Context, query *serviceaccounts.GetSATokensQuery) ([]apikey.APIKey, error)
func (*ServiceAccountsService) MigrateApiKey ¶
func (sa *ServiceAccountsService) MigrateApiKey(ctx context.Context, orgID, keyID int64) error
func (*ServiceAccountsService) MigrateApiKeysToServiceAccounts ¶
func (sa *ServiceAccountsService) MigrateApiKeysToServiceAccounts(ctx context.Context, orgID int64) (*serviceaccounts.MigrationResult, error)
func (*ServiceAccountsService) RetrieveServiceAccount ¶
func (sa *ServiceAccountsService) RetrieveServiceAccount(ctx context.Context, orgID int64, serviceAccountID int64) (*serviceaccounts.ServiceAccountProfileDTO, error)
func (*ServiceAccountsService) RetrieveServiceAccountIdByName ¶
func (*ServiceAccountsService) Run ¶
func (sa *ServiceAccountsService) Run(ctx context.Context) error
func (*ServiceAccountsService) SearchOrgServiceAccounts ¶
func (sa *ServiceAccountsService) SearchOrgServiceAccounts(ctx context.Context, query *serviceaccounts.SearchOrgServiceAccountsQuery) (*serviceaccounts.SearchOrgServiceAccountsResult, error)
func (*ServiceAccountsService) UpdateServiceAccount ¶
func (sa *ServiceAccountsService) UpdateServiceAccount(ctx context.Context, orgID int64, serviceAccountID int64, saForm *serviceaccounts.UpdateServiceAccountForm) (*serviceaccounts.ServiceAccountProfileDTO, error)
Click to show internal directories.
Click to hide internal directories.