credentials

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 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 GetResponse

CreateResponse is the response struct for POST call

type Credential

type Credential struct {
	Host      string            `json:"host,omitempty"`
	Port      int               `json:"port,omitempty"`
	Hosts     []string          `json:"hosts,omitempty"`
	Name      string            `json:"name,omitempty"`
	Password  string            `json:"password,omitempty"`
	Protocols map[string]string `json:"protocols,omitempty"`
}

Credential holds the credential information

type CredentialsListItem

type CredentialsListItem struct {
	ID string `json:"id,omitempty"`
}

CredentialsListItem is a single credential ID from ListResponse

type DSACredentialsService

type DSACredentialsService common.Service

DSACredentialsService is the service that retrieves the DSA options

func New

New returns a new handler for the service

func (*DSACredentialsService) Create

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

Create creates a new instance credential See also https://api.stackit.schwarz/data-services/openapi.v1.html#operation/Credentials.Post

func (*DSACredentialsService) Delete

func (svc *DSACredentialsService) Delete(ctx context.Context, projectID, instanceID, credentialID string) (res DeleteResponse, err error)

Delete deletes an instance credential See also https://api.stackit.schwarz/data-services/openapi.v1.html#operation/Credentials.delete

func (*DSACredentialsService) Get

func (svc *DSACredentialsService) Get(ctx context.Context, projectID, instanceID, credentialID string) (res GetResponse, err error)

Get returns a signle instance credential See also https://api.stackit.schwarz/data-services/openapi.v1.html#operation/Credentials.get

func (*DSACredentialsService) List

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

List returns all instance credentials See also https://api.stackit.schwarz/data-services/openapi.v1.html#operation/Credentials.get

type DeleteResponse

type DeleteResponse struct {
	Error       string `json:"error,omitempty"`
	Description string `json:"description,omitempty"`
}

DeleteResponse is the delete request response struct

type GetResponse

type GetResponse struct {
	ID  string        `json:"id,omitempty"`
	URI string        `json:"uri,omitempty"`
	Raw RawCredential `json:"raw,omitempty"`
}

GetResponse is the response struct for GET call

type ListResponse

type ListResponse struct {
	CredentialsList []CredentialsListItem `json:"credentialsList,omitempty"`
}

ListResponse is the APIs response for listing all instance credentials

type RawCredential

type RawCredential struct {
	Credential      Credential          `json:"credentials,omitempty"`
	SyslogDrainURL  string              `json:"syslogDrainUrl,omitempty"`
	RouteServiceURL string              `json:"routeServiceUrl,omitempty"`
	VolumeMounts    []map[string]string `json:"volumeMounts,omitempty"`
}

RawCredential contains the full credential information

Jump to

Keyboard shortcuts

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