Documentation ¶
Index ¶
- type CreateResponse
- type Credential
- type CredentialList
- type CredentialsInfo
- type CredentialsService
- func (svc *CredentialsService) Create(ctx context.Context, projectID, instanceID string) (res CreateResponse, err error)
- func (svc *CredentialsService) Delete(ctx context.Context, projectID, instanceID, username string) (res Credential, err error)
- func (svc *CredentialsService) Get(ctx context.Context, projectID, instanceID, username string) (res Credential, err error)
- func (svc *CredentialsService) List(ctx context.Context, projectID, instanceID string) (res CredentialList, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateResponse ¶
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 ¶
CredentialsService is the service that handles CRUD functionality for Argus instance credentials
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