Documentation ¶
Index ¶
- Constants
- type Service
- func (service *Service) CreateAPIKey(record *portainer.APIKey) error
- func (service *Service) DeleteAPIKey(ID portainer.APIKeyID) error
- func (service *Service) GetAPIKey(keyID portainer.APIKeyID) (*portainer.APIKey, error)
- func (service *Service) GetAPIKeyByDigest(digest []byte) (*portainer.APIKey, error)
- func (service *Service) GetAPIKeysByUserID(userID portainer.UserID) ([]portainer.APIKey, error)
- func (service *Service) UpdateAPIKey(key *portainer.APIKey) error
Constants ¶
View Source
const (
// BucketName represents the name of the bucket where this service stores data.
BucketName = "api_key"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents a service for managing api-key data.
func NewService ¶
func NewService(connection portainer.Connection) (*Service, error)
NewService creates a new instance of a service.
func (*Service) CreateAPIKey ¶
CreateAPIKey creates a new APIKey object.
func (*Service) GetAPIKeyByDigest ¶
GetAPIKeyByDigest returns the API key for the associated digest. Note: there is a 1-to-1 mapping of api-key and digest
func (*Service) GetAPIKeysByUserID ¶
GetAPIKeysByUserID returns a slice containing all the APIKeys a user has access to.
Click to show internal directories.
Click to hide internal directories.