keys

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessKeyCreateResponse

type AccessKeyCreateResponse struct {
	Project         string `json:"project"`
	DisplayName     string `json:"displayName"`
	KeyID           string `json:"keyId"`
	Expires         string `json:"expires"`
	AccessKey       string `json:"accessKey"`
	SecretAccessKey string `json:"secretAccessKey"`
}

AccessKeyCreateResponse is the struct representing a creation response

type AccessKeyDetails

type AccessKeyDetails struct {
	DisplayName string `json:"displayName"`
	KeyID       string `json:"keyId"`
	Expires     string `json:"expires"`
}

AccessKeyDetails is the minial information of an access key

type AccessKeyListResponse

type AccessKeyListResponse struct {
	Project    string             `json:"project"`
	AccessKeys []AccessKeyDetails `json:"accessKeys"`
}

AccessKeyListResponse is the api list response struct for a given project ID

type Expiry

type Expiry struct {
	Expires string `json:"expires,omitempty"`
}

Expiry represents the date and time in which the key will expire in

type ObjectStorageAccessKeysService

type ObjectStorageAccessKeysService common.Service

ObjectStorageAccessKeysService is the service that handles enabling / disabling AccessKeys for a project

func New

New returns a new handler for the service

func (*ObjectStorageAccessKeysService) Create

func (svc *ObjectStorageAccessKeysService) Create(ctx context.Context, projectID, expires, credentialsGroupID string) (res AccessKeyCreateResponse, err error)

Create creates an Access Keys If expires is empty, the key will not expire See also https://api.stackit.schwarz/object-storage-service/openapi.v1.html#operation/create_project_v1_project__projectId__post

func (*ObjectStorageAccessKeysService) Delete

func (svc *ObjectStorageAccessKeysService) Delete(ctx context.Context, projectID, keyID, credentialsGroupID string) (err error)

Delete deletes an Access Keys by ID See also https://api.stackit.schwarz/object-storage-service/openapi.v1.html#operation/delete_access_key_v1_project__projectId__access_key__keyId__delete

func (*ObjectStorageAccessKeysService) List

func (svc *ObjectStorageAccessKeysService) List(ctx context.Context, projectID, credentialsGroupID string) (res AccessKeyListResponse, err error)

List returns a list of access keys assigned to a given Project ID See also https://api.stackit.schwarz/object-storage-service/openapi.v1.html#operation/get_access_keys_v1_project__projectId__access_keys_get

Jump to

Keyboard shortcuts

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