# README

Go API client for argus

API endpoints for Argus on STACKIT

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import argus "github.com/GIT_USER_ID/GIT_REPO_ID"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), argus.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), argus.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), argus.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), argus.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://api.argus.eu01.stackit.cloud

ClassMethodHTTP requestDescription
AlertConfigApiV1InstancesAlertconfigsListGet /v1/instances/{instanceId}/alertconfigs
AlertConfigApiV1InstancesAlertconfigsUpdatePut /v1/instances/{instanceId}/alertconfigs
AlertConfigApiV1ProjectsInstancesAlertconfigsListGet /v1/projects/{projectId}/instances/{instanceId}/alertconfigs
AlertConfigApiV1ProjectsInstancesAlertconfigsUpdatePut /v1/projects/{projectId}/instances/{instanceId}/alertconfigs
AlertGroupsApiV1InstancesAlertgroupsAllDeleteDelete /v1/instances/{instanceId}/alertgroups
AlertGroupsApiV1InstancesAlertgroupsCreatePost /v1/instances/{instanceId}/alertgroups
AlertGroupsApiV1InstancesAlertgroupsDeleteDelete /v1/instances/{instanceId}/alertgroups/{groupName}
AlertGroupsApiV1InstancesAlertgroupsListGet /v1/instances/{instanceId}/alertgroups
AlertGroupsApiV1InstancesAlertgroupsPartialUpdatePatch /v1/instances/{instanceId}/alertgroups
AlertGroupsApiV1InstancesAlertgroupsReadGet /v1/instances/{instanceId}/alertgroups/{groupName}
AlertGroupsApiV1InstancesAlertgroupsUpdatePut /v1/instances/{instanceId}/alertgroups/{groupName}
AlertGroupsApiV1ProjectsInstancesAlertgroupsAllDeleteDelete /v1/projects/{projectId}/instances/{instanceId}/alertgroups
AlertGroupsApiV1ProjectsInstancesAlertgroupsCreatePost /v1/projects/{projectId}/instances/{instanceId}/alertgroups
AlertGroupsApiV1ProjectsInstancesAlertgroupsDeleteDelete /v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}
AlertGroupsApiV1ProjectsInstancesAlertgroupsListGet /v1/projects/{projectId}/instances/{instanceId}/alertgroups
AlertGroupsApiV1ProjectsInstancesAlertgroupsPartialUpdatePatch /v1/projects/{projectId}/instances/{instanceId}/alertgroups
AlertGroupsApiV1ProjectsInstancesAlertgroupsReadGet /v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}
AlertGroupsApiV1ProjectsInstancesAlertgroupsUpdatePut /v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}
AlertRulesApiV1InstancesAlertgroupsAlertrulesAllDeleteDelete /v1/instances/{instanceId}/alertgroups/{groupName}/alertrules
AlertRulesApiV1InstancesAlertgroupsAlertrulesCreatePost /v1/instances/{instanceId}/alertgroups/{groupName}/alertrules
AlertRulesApiV1InstancesAlertgroupsAlertrulesDeleteDelete /v1/instances/{instanceId}/alertgroups/{groupName}/alertrules/{alertName}
AlertRulesApiV1InstancesAlertgroupsAlertrulesListGet /v1/instances/{instanceId}/alertgroups/{groupName}/alertrules
AlertRulesApiV1InstancesAlertgroupsAlertrulesPartialUpdatePatch /v1/instances/{instanceId}/alertgroups/{groupName}/alertrules
AlertRulesApiV1InstancesAlertgroupsAlertrulesReadGet /v1/instances/{instanceId}/alertgroups/{groupName}/alertrules/{alertName}
AlertRulesApiV1InstancesAlertgroupsAlertrulesUpdatePut /v1/instances/{instanceId}/alertgroups/{groupName}/alertrules/{alertName}
AlertRulesApiV1ProjectsInstancesAlertgroupsAlertrulesAllDeleteDelete /v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}/alertrules
AlertRulesApiV1ProjectsInstancesAlertgroupsAlertrulesCreatePost /v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}/alertrules
AlertRulesApiV1ProjectsInstancesAlertgroupsAlertrulesDeleteDelete /v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}/alertrules/{alertName}
AlertRulesApiV1ProjectsInstancesAlertgroupsAlertrulesListGet /v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}/alertrules
AlertRulesApiV1ProjectsInstancesAlertgroupsAlertrulesPartialUpdatePatch /v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}/alertrules
AlertRulesApiV1ProjectsInstancesAlertgroupsAlertrulesReadGet /v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}/alertrules/{alertName}
AlertRulesApiV1ProjectsInstancesAlertgroupsAlertrulesUpdatePut /v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}/alertrules/{alertName}
BucketRetentionApiV1InstancesBucketRetentionsListGet /v1/instances/{instanceId}/bucket-retentions
BucketRetentionApiV1InstancesBucketRetentionsUpdatePut /v1/instances/{instanceId}/bucket-retentions
BucketRetentionApiV1ProjectsInstancesBucketRetentionsListGet /v1/projects/{projectId}/instances/{instanceId}/bucket-retentions
BucketRetentionApiV1ProjectsInstancesBucketRetentionsUpdatePut /v1/projects/{projectId}/instances/{instanceId}/bucket-retentions
GrafanaConfigsApiV1InstancesGrafanaConfigsListGet /v1/instances/{instanceId}/grafana-configs
GrafanaConfigsApiV1InstancesGrafanaConfigsUpdatePut /v1/instances/{instanceId}/grafana-configs
GrafanaConfigsApiV1ProjectsInstancesGrafanaConfigsListGet /v1/projects/{projectId}/instances/{instanceId}/grafana-configs
GrafanaConfigsApiV1ProjectsInstancesGrafanaConfigsUpdatePut /v1/projects/{projectId}/instances/{instanceId}/grafana-configs
InstancesApiV1InstancesReadGet /v1/instances/{instanceId}
InstancesApiV1ProjectsInstancesReadGet /v1/projects/{projectId}/instances/{instanceId}
ScrapeConfigApiV1InstancesScrapeconfigsAllDeleteDelete /v1/instances/{instanceId}/scrapeconfigs
ScrapeConfigApiV1InstancesScrapeconfigsCreatePost /v1/instances/{instanceId}/scrapeconfigs
ScrapeConfigApiV1InstancesScrapeconfigsDeleteDelete /v1/instances/{instanceId}/scrapeconfigs/{jobName}
ScrapeConfigApiV1InstancesScrapeconfigsListGet /v1/instances/{instanceId}/scrapeconfigs
ScrapeConfigApiV1InstancesScrapeconfigsPartialUpdatePatch /v1/instances/{instanceId}/scrapeconfigs
ScrapeConfigApiV1InstancesScrapeconfigsReadGet /v1/instances/{instanceId}/scrapeconfigs/{jobName}
ScrapeConfigApiV1InstancesScrapeconfigsUpdatePut /v1/instances/{instanceId}/scrapeconfigs/{jobName}
ScrapeConfigApiV1ProjectsInstancesScrapeconfigsAllDeleteDelete /v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs
ScrapeConfigApiV1ProjectsInstancesScrapeconfigsCreatePost /v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs
ScrapeConfigApiV1ProjectsInstancesScrapeconfigsDeleteDelete /v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs/{jobName}
ScrapeConfigApiV1ProjectsInstancesScrapeconfigsListGet /v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs
ScrapeConfigApiV1ProjectsInstancesScrapeconfigsPartialUpdatePatch /v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs
ScrapeConfigApiV1ProjectsInstancesScrapeconfigsReadGet /v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs/{jobName}
ScrapeConfigApiV1ProjectsInstancesScrapeconfigsUpdatePut /v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs/{jobName}

Documentation For Models

Documentation For Authorization

Basic

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

bearerAuth

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

[email protected]

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

AlertConfigApiService AlertConfigApi service.
AlertGroupsApiService AlertGroupsApi service.
AlertRulesApiService AlertRulesApi service.
BucketRetentionApiService BucketRetentionApi service.
GrafanaConfigsApiService GrafanaConfigsApi service.
InstancesApiService InstancesApi service.
ScrapeConfigApiService ScrapeConfigApi service.