Documentation ¶
Index ¶
- type CreateResponse
- type Credential
- type CredentialsListItem
- type DSACredentialsService
- func (svc *DSACredentialsService) Create(ctx context.Context, projectID, instanceID string) (res CreateResponse, err error)
- func (svc *DSACredentialsService) Delete(ctx context.Context, projectID, instanceID, credentialID string) (res DeleteResponse, err error)
- func (svc *DSACredentialsService) Get(ctx context.Context, projectID, instanceID, credentialID string) (res GetResponse, err error)
- func (svc *DSACredentialsService) List(ctx context.Context, projectID, instanceID string) (res ListResponse, err error)
- type DeleteResponse
- type GetResponse
- type ListResponse
- type RawCredential
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 { Port int `json:"port,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Hosts []string `json:"hosts,omitempty"` Host string `json:"host,omitempty"` URI string `json:"uri,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 ¶
DSACredentialsService is the service that retrieves the DSA options
func New ¶
func New(c common.Client) *DSACredentialsService
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"` }
RawCredential contains the full credential information