Documentation
¶
Index ¶
- func Validate(projectID, instanceName, planID string) error
- func ValidateInstanceName(instanceName string) error
- func ValidatePlanID(planID string) error
- type CreateOrUpdateRequest
- type CreateOrUpdateResponse
- type Instance
- type InstanceItem
- type InstanceList
- type InstanceSensitiveFields
- type InstancesService
- func (svc *InstancesService) Create(ctx context.Context, projectID, instanceName, planID string, ...) (res CreateOrUpdateResponse, err error)
- func (svc *InstancesService) Delete(ctx context.Context, projectID, instanceID string) (res Instance, err error)
- func (svc *InstancesService) Get(ctx context.Context, projectID, instanceID string) (res Instance, err error)
- func (svc *InstancesService) List(ctx context.Context, projectID string) (res InstanceList, err error)
- func (svc *InstancesService) Update(ctx context.Context, projectID, instanceID, instanceName, planID string, ...) (res CreateOrUpdateResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateInstanceName ¶
ValidateInstanceName validates argus instance name
func ValidatePlanID ¶
ValidatePlanID validates argus instance plan ID
Types ¶
type CreateOrUpdateRequest ¶
type CreateOrUpdateRequest struct {
Name string `json:"name"`
PlanID string `json:"planId"`
Parameters map[string]string `json:"parameter"`
}
CreateOrUpdateRequest is the structure needed for creating or updating an instance
type CreateOrUpdateResponse ¶
type CreateOrUpdateResponse struct {
Message string `json:"message,omitempty"`
InstanceID string `json:"instanceId,omitempty"`
DashboardURL string `json:"dashboardUrl,omitempty"`
}
CreateOrUpdateResponse is the api response structure for instance creation/update
type Instance ¶
type Instance struct {
Message string `json:"message,omitempty"`
Error string `json:"error,omitempty"`
DashboardURL string `json:"dashboardUrl,omitempty"`
IsUpdatable bool `json:"isUpdatable,omitempty"`
Name string `json:"name,omitempty"`
Parameters map[string]string `json:"parameters,omitempty"`
ID string `json:"id,omitempty"`
ServiceName string `json:"serviceName,omitempty"`
PlanID string `json:"planId,omitempty"`
PlanName string `json:"planName,omitempty"`
PlanSchema string `json:"planSchema,omitempty"`
Status string `json:"status,omitempty"`
Instance InstanceSensitiveFields `json:"instance,omitempty"`
}
Instance is the structure returned when reading a single instance
type InstanceItem ¶
type InstanceItem struct {
ID string `json:"id,omitempty"`
PlanName string `json:"planName,omitempty"`
Instance string `json:"instance,omitempty"`
Name string `json:"name,omitempty"`
Status string `json:"status,omitempty"`
ServiceName string `json:"serviceName,omitempty"`
}
InstanceItem is an item in the list of instances from the list api endpoint
type InstanceList ¶
type InstanceList struct {
Message string `json:"message,omitempty"`
Instances []InstanceItem `json:"instances"`
}
InstanceList is the structure returned from the list api endpoint
type InstanceSensitiveFields ¶
type InstanceSensitiveFields struct {
Instance string `json:"instance,omitempty"`
Cluster string `json:"cluster,omitempty"`
GrafanaURL string `json:"grafanaUrl,omitempty"`
DashboardURL string `json:"dashboardUrl,omitempty"`
GrafanaPlugins []interface{} `json:"grafanaPlugins,omitempty"`
Name string `json:"name,omitempty"`
GrafanaAdminPassword string `json:"grafanaAdminPassword,omitempty"`
GrafanaAdminUser string `json:"grafanaAdminUser,omitempty"`
MetricsRetentionTimeRaw int `json:"metricsRetentionTimeRaw,omitempty"`
MetricsRetentionTime5m int `json:"MetricsRetentionTime5m,omitempty"`
MetricsRetentionTime1h int `json:"MetricsRetentionTime1h,omitempty"`
MetricsURL string `json:"metricsUrl,omitempty"`
PushMetricsURL string `json:"pushMetricsUrl,omitempty"`
GrafanaPublicReadAccess bool `json:"grafanaPublicReadAccess,omitempty"`
TargetsURL string `json:"targetsUrl,omitempty"`
AlertingURL string `json:"alertingUrl,omitempty"`
Plan plans.Plan `json:"plan,omitempty"`
LogsURL string `json:"logsUrl,omitempty"`
LogsPushURL string `json:"logsPushUrl,omitempty"`
JaegerTracesURL string `json:"jaegerTracesUrl,omitempty"`
OtlpTracesURL string `json:"otlpTracesUrl,omitempty"`
ZipkinSpansURL string `json:"zipkinSpansUrl,omitempty"`
JaegerUIURL string `json:"jaegerUiUrl,omitempty"`
}
InstanceSensitiveFields provides more elaborated information of the instance, including sensitive data
type InstancesService ¶
InstancesService is the service that handles CRUD functionality for Argus instances and also wraps instance credentials service
func (*InstancesService) Create ¶
func (svc *InstancesService) Create(ctx context.Context, projectID, instanceName, planID string, params map[string]string) (res CreateOrUpdateResponse, err error)
Create creates a new Argus instance See also https://api.stackit.schwarz/argus-monitoring-service/openapi.v1.html#operation/v1_projects_instances_create
func (*InstancesService) Delete ¶
func (svc *InstancesService) Delete(ctx context.Context, projectID, instanceID string) (res Instance, err error)
Delete deleted an instance by project and instance IDs See also https://api.stackit.schwarz/argus-monitoring-service/openapi.v1.html#operation/v1_projects_instances_delete
func (*InstancesService) Get ¶
func (svc *InstancesService) Get(ctx context.Context, projectID, instanceID string) (res Instance, err error)
Get returns the instance information by project and instance IDs See also https://api.stackit.schwarz/argus-monitoring-service/openapi.v1.html#operation/v1_projects_instances_read
func (*InstancesService) List ¶
func (svc *InstancesService) List(ctx context.Context, projectID string) (res InstanceList, err error)
List returns a list of argus instances in project See also https://api.stackit.schwarz/argus-monitoring-service/openapi.v1.html#operation/v1_projects_instances_list
func (*InstancesService) Update ¶
func (svc *InstancesService) Update(ctx context.Context, projectID, instanceID, instanceName, planID string, params map[string]string) (res CreateOrUpdateResponse, err error)
Update updates a new Argus instance See also https://api.stackit.schwarz/argus-monitoring-service/openapi.v1.html#operation/v1_projects_instances_update