credentials

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateResponse

type CreateResponse struct {
	Message     string `json:"message,omitempty"`
	Credentials struct {
		Username string `json:"username,omitempty"`
		Password string `json:"password,omitempty"`
	} `json:"credentials,omitempty"`
}

type Credential

type Credential struct {
	Message         string `json:"message,omitempty"`
	Name            string `json:"name,omitempty"`
	ID              string `json:"id,omitempty"`
	CredentialsInfo struct {
		Username string `json:"username,omitempty"`
	} `json:"credentialsInfo,omitempty"`
}

Credential is an item from credential list credentials

type CredentialList

type CredentialList struct {
	Message     string       `json:"message,omitempty"`
	Credentials []Credential `json:"credentials"`
}

CredentialList is the api response struct for credential list

type CredentialsInfo

type CredentialsInfo struct {
	Username string `json:"username,omitempty"`
}

CredentialsInfo contains credential specific data

type CredentialsService

type CredentialsService common.Service

CredentialsService is the service that handles CRUD functionality for Argus instance credentials

func New

New returns a new handler for the service

func (*CredentialsService) Create

func (svc *CredentialsService) Create(ctx context.Context, projectID, instanceID string) (res CreateResponse, err error)

Create creates a new credential See also https://api.stackit.schwarz/argus-monitoring-service/openapi.v1.html#operation/v1_projects_instances_credentials_create

func (*CredentialsService) Delete

func (svc *CredentialsService) Delete(ctx context.Context, projectID, instanceID, username string) (res Credential, err error)

Delete deletes a credential See also https://api.stackit.schwarz/argus-monitoring-service/openapi.v1.html#operation/v1_projects_instances_credentials_delete

func (*CredentialsService) Get

func (svc *CredentialsService) Get(ctx context.Context, projectID, instanceID, username string) (res Credential, err error)

Get returns information about credential by username See also https://api.stackit.schwarz/argus-monitoring-service/openapi.v1.html#operation/v1_projects_instances_credentials_read

func (*CredentialsService) List

func (svc *CredentialsService) List(ctx context.Context, projectID, instanceID string) (res CredentialList, err error)

List returns a list of argus instance credentials See also https://api.stackit.schwarz/argus-monitoring-service/openapi.v1.html#operation/v1_projects_instances_credentials_list

Jump to

Keyboard shortcuts

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