api

package
v0.0.85-test Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceAccountsAPI

type ServiceAccountsAPI struct {
	RouterRegister routing.RouteRegister
	// contains filtered or unexported fields
}

func NewServiceAccountsAPI

func NewServiceAccountsAPI(
	cfg *setting.Cfg,
	service serviceaccounts.Service,
	accesscontrol accesscontrol.AccessControl,
	routerRegister routing.RouteRegister,
	store serviceaccounts.Store,
) *ServiceAccountsAPI

func (*ServiceAccountsAPI) ConvertToServiceAccount

func (api *ServiceAccountsAPI) ConvertToServiceAccount(ctx *models.ReqContext) response.Response

func (*ServiceAccountsAPI) CreateServiceAccount

func (api *ServiceAccountsAPI) CreateServiceAccount(c *models.ReqContext) response.Response

POST /api/serviceaccounts

func (*ServiceAccountsAPI) CreateToken

func (api *ServiceAccountsAPI) CreateToken(c *models.ReqContext) response.Response

CreateNewToken adds an API key to a service account

func (*ServiceAccountsAPI) DeleteServiceAccount

func (api *ServiceAccountsAPI) DeleteServiceAccount(ctx *models.ReqContext) response.Response

func (*ServiceAccountsAPI) DeleteToken

func (api *ServiceAccountsAPI) DeleteToken(c *models.ReqContext) response.Response

DeleteToken deletes service account tokens

func (*ServiceAccountsAPI) ListTokens

func (api *ServiceAccountsAPI) ListTokens(ctx *models.ReqContext) response.Response

func (*ServiceAccountsAPI) RegisterAPIEndpoints

func (api *ServiceAccountsAPI) RegisterAPIEndpoints(
	features featuremgmt.FeatureToggles,
)

func (*ServiceAccountsAPI) RetrieveServiceAccount

func (api *ServiceAccountsAPI) RetrieveServiceAccount(ctx *models.ReqContext) response.Response

func (*ServiceAccountsAPI) SearchOrgServiceAccountsWithPaging

func (api *ServiceAccountsAPI) SearchOrgServiceAccountsWithPaging(c *models.ReqContext) response.Response

SearchOrgServiceAccountsWithPaging is an HTTP handler to search for org users with paging. GET /api/serviceaccounts/search

func (*ServiceAccountsAPI) UpgradeServiceAccounts

func (api *ServiceAccountsAPI) UpgradeServiceAccounts(ctx *models.ReqContext) response.Response

type TokenDTO

type TokenDTO struct {
	Id                     int64      `json:"id"`
	Name                   string     `json:"name"`
	Created                *time.Time `json:"created"`
	Expiration             *time.Time `json:"expiration"`
	SecondsUntilExpiration *float64   `json:"secondsUntilExpiration"`
	HasExpired             bool       `json:"hasExpired"`
}

Jump to

Keyboard shortcuts

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