manager

package
v0.0.0-...-fb7f86c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

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 (*ServiceAccountsService) DeleteServiceAccount

func (sa *ServiceAccountsService) DeleteServiceAccount(ctx context.Context, orgID, serviceAccountID int64) error

func (*ServiceAccountsService) DeleteServiceAccountToken

func (sa *ServiceAccountsService) DeleteServiceAccountToken(ctx context.Context, orgID, serviceAccountID int64, tokenID int64) error

func (*ServiceAccountsService) ListTokens

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 (sa *ServiceAccountsService) RetrieveServiceAccountIdByName(ctx context.Context, orgID int64, name string) (int64, error)

func (*ServiceAccountsService) Run

func (*ServiceAccountsService) UpdateServiceAccount

func (sa *ServiceAccountsService) UpdateServiceAccount(ctx context.Context, orgID int64, serviceAccountID int64, saForm *serviceaccounts.UpdateServiceAccountForm) (*serviceaccounts.ServiceAccountProfileDTO, error)

Jump to

Keyboard shortcuts

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