mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 04:40:05 +01:00
feat: adding background jobs, Dockerfile
This commit is contained in:
457
sdk/go/api_annotations.go
Normal file
457
sdk/go/api_annotations.go
Normal file
@@ -0,0 +1,457 @@
|
||||
/*
|
||||
AutoGlue API
|
||||
|
||||
API for managing K3s clusters across cloud providers
|
||||
|
||||
API version: 1.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package autoglue
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// AnnotationsAPIService AnnotationsAPI service
|
||||
type AnnotationsAPIService service
|
||||
|
||||
type ApiGetAnnotationRequest struct {
|
||||
ctx context.Context
|
||||
ApiService *AnnotationsAPIService
|
||||
id string
|
||||
xOrgID *string
|
||||
include *string
|
||||
}
|
||||
|
||||
// Organization UUID
|
||||
func (r ApiGetAnnotationRequest) XOrgID(xOrgID string) ApiGetAnnotationRequest {
|
||||
r.xOrgID = &xOrgID
|
||||
return r
|
||||
}
|
||||
|
||||
// Optional: node_pools
|
||||
func (r ApiGetAnnotationRequest) Include(include string) ApiGetAnnotationRequest {
|
||||
r.include = &include
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiGetAnnotationRequest) Execute() (*DtoAnnotationResponse, *http.Response, error) {
|
||||
return r.ApiService.GetAnnotationExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
GetAnnotation Get annotation by ID (org scoped)
|
||||
|
||||
Returns one annotation. Add `include=node_pools` to include node pools.
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@param id Annotation ID (UUID)
|
||||
@return ApiGetAnnotationRequest
|
||||
*/
|
||||
func (a *AnnotationsAPIService) GetAnnotation(ctx context.Context, id string) ApiGetAnnotationRequest {
|
||||
return ApiGetAnnotationRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
id: id,
|
||||
}
|
||||
}
|
||||
|
||||
// Execute executes the request
|
||||
//
|
||||
// @return DtoAnnotationResponse
|
||||
func (a *AnnotationsAPIService) GetAnnotationExecute(r ApiGetAnnotationRequest) (*DtoAnnotationResponse, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
formFiles []formFile
|
||||
localVarReturnValue *DtoAnnotationResponse
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationsAPIService.GetAnnotation")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/annotations/{id}"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1)
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
if r.include != nil {
|
||||
parameterAddToHeaderOrQuery(localVarQueryParams, "include", r.include, "", "")
|
||||
}
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
if r.xOrgID != nil {
|
||||
parameterAddToHeaderOrQuery(localVarHeaderParams, "X-Org-ID", r.xOrgID, "", "")
|
||||
}
|
||||
if r.ctx != nil {
|
||||
// API Key Authentication
|
||||
if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
|
||||
if apiKey, ok := auth["OrgKeyAuth"]; ok {
|
||||
var key string
|
||||
if apiKey.Prefix != "" {
|
||||
key = apiKey.Prefix + " " + apiKey.Key
|
||||
} else {
|
||||
key = apiKey.Key
|
||||
}
|
||||
localVarHeaderParams["X-ORG-KEY"] = key
|
||||
}
|
||||
}
|
||||
}
|
||||
if r.ctx != nil {
|
||||
// API Key Authentication
|
||||
if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
|
||||
if apiKey, ok := auth["OrgSecretAuth"]; ok {
|
||||
var key string
|
||||
if apiKey.Prefix != "" {
|
||||
key = apiKey.Prefix + " " + apiKey.Key
|
||||
} else {
|
||||
key = apiKey.Key
|
||||
}
|
||||
localVarHeaderParams["X-ORG-SECRET"] = key
|
||||
}
|
||||
}
|
||||
}
|
||||
if r.ctx != nil {
|
||||
// API Key Authentication
|
||||
if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
|
||||
if apiKey, ok := auth["BearerAuth"]; ok {
|
||||
var key string
|
||||
if apiKey.Prefix != "" {
|
||||
key = apiKey.Prefix + " " + apiKey.Key
|
||||
} else {
|
||||
key = apiKey.Key
|
||||
}
|
||||
localVarHeaderParams["Authorization"] = key
|
||||
}
|
||||
}
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 400 {
|
||||
var v string
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 401 {
|
||||
var v string
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 403 {
|
||||
var v string
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 404 {
|
||||
var v string
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 500 {
|
||||
var v string
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiListAnnotationsRequest struct {
|
||||
ctx context.Context
|
||||
ApiService *AnnotationsAPIService
|
||||
xOrgID *string
|
||||
name *string
|
||||
value *string
|
||||
q *string
|
||||
}
|
||||
|
||||
// Organization UUID
|
||||
func (r ApiListAnnotationsRequest) XOrgID(xOrgID string) ApiListAnnotationsRequest {
|
||||
r.xOrgID = &xOrgID
|
||||
return r
|
||||
}
|
||||
|
||||
// Exact name
|
||||
func (r ApiListAnnotationsRequest) Name(name string) ApiListAnnotationsRequest {
|
||||
r.name = &name
|
||||
return r
|
||||
}
|
||||
|
||||
// Exact value
|
||||
func (r ApiListAnnotationsRequest) Value(value string) ApiListAnnotationsRequest {
|
||||
r.value = &value
|
||||
return r
|
||||
}
|
||||
|
||||
// name contains (case-insensitive)
|
||||
func (r ApiListAnnotationsRequest) Q(q string) ApiListAnnotationsRequest {
|
||||
r.q = &q
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiListAnnotationsRequest) Execute() ([]DtoAnnotationResponse, *http.Response, error) {
|
||||
return r.ApiService.ListAnnotationsExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
ListAnnotations List annotations (org scoped)
|
||||
|
||||
Returns annotations for the organization in X-Org-ID. Filters: `name`, `value`, and `q` (name contains). Add `include=node_pools` to include linked node pools.
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@return ApiListAnnotationsRequest
|
||||
*/
|
||||
func (a *AnnotationsAPIService) ListAnnotations(ctx context.Context) ApiListAnnotationsRequest {
|
||||
return ApiListAnnotationsRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// Execute executes the request
|
||||
//
|
||||
// @return []DtoAnnotationResponse
|
||||
func (a *AnnotationsAPIService) ListAnnotationsExecute(r ApiListAnnotationsRequest) ([]DtoAnnotationResponse, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
formFiles []formFile
|
||||
localVarReturnValue []DtoAnnotationResponse
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationsAPIService.ListAnnotations")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/annotations"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
if r.name != nil {
|
||||
parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "", "")
|
||||
}
|
||||
if r.value != nil {
|
||||
parameterAddToHeaderOrQuery(localVarQueryParams, "value", r.value, "", "")
|
||||
}
|
||||
if r.q != nil {
|
||||
parameterAddToHeaderOrQuery(localVarQueryParams, "q", r.q, "", "")
|
||||
}
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
if r.xOrgID != nil {
|
||||
parameterAddToHeaderOrQuery(localVarHeaderParams, "X-Org-ID", r.xOrgID, "", "")
|
||||
}
|
||||
if r.ctx != nil {
|
||||
// API Key Authentication
|
||||
if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
|
||||
if apiKey, ok := auth["OrgKeyAuth"]; ok {
|
||||
var key string
|
||||
if apiKey.Prefix != "" {
|
||||
key = apiKey.Prefix + " " + apiKey.Key
|
||||
} else {
|
||||
key = apiKey.Key
|
||||
}
|
||||
localVarHeaderParams["X-ORG-KEY"] = key
|
||||
}
|
||||
}
|
||||
}
|
||||
if r.ctx != nil {
|
||||
// API Key Authentication
|
||||
if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
|
||||
if apiKey, ok := auth["OrgSecretAuth"]; ok {
|
||||
var key string
|
||||
if apiKey.Prefix != "" {
|
||||
key = apiKey.Prefix + " " + apiKey.Key
|
||||
} else {
|
||||
key = apiKey.Key
|
||||
}
|
||||
localVarHeaderParams["X-ORG-SECRET"] = key
|
||||
}
|
||||
}
|
||||
}
|
||||
if r.ctx != nil {
|
||||
// API Key Authentication
|
||||
if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
|
||||
if apiKey, ok := auth["BearerAuth"]; ok {
|
||||
var key string
|
||||
if apiKey.Prefix != "" {
|
||||
key = apiKey.Prefix + " " + apiKey.Key
|
||||
} else {
|
||||
key = apiKey.Key
|
||||
}
|
||||
localVarHeaderParams["Authorization"] = key
|
||||
}
|
||||
}
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 401 {
|
||||
var v string
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 403 {
|
||||
var v string
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 500 {
|
||||
var v string
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
122
sdk/go/api_health.go
Normal file
122
sdk/go/api_health.go
Normal file
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
AutoGlue API
|
||||
|
||||
API for managing K3s clusters across cloud providers
|
||||
|
||||
API version: 1.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package autoglue
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// HealthAPIService HealthAPI service
|
||||
type HealthAPIService service
|
||||
|
||||
type ApiHealthCheckOperationIdRequest struct {
|
||||
ctx context.Context
|
||||
ApiService *HealthAPIService
|
||||
}
|
||||
|
||||
func (r ApiHealthCheckOperationIdRequest) Execute() (*HandlersHealthStatus, *http.Response, error) {
|
||||
return r.ApiService.HealthCheckOperationIdExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
HealthCheckOperationId Basic health check
|
||||
|
||||
Returns 200 OK when the service is up
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@return ApiHealthCheckOperationIdRequest
|
||||
*/
|
||||
func (a *HealthAPIService) HealthCheckOperationId(ctx context.Context) ApiHealthCheckOperationIdRequest {
|
||||
return ApiHealthCheckOperationIdRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// Execute executes the request
|
||||
//
|
||||
// @return HandlersHealthStatus
|
||||
func (a *HealthAPIService) HealthCheckOperationIdExecute(r ApiHealthCheckOperationIdRequest) (*HandlersHealthStatus, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
formFiles []formFile
|
||||
localVarReturnValue *HandlersHealthStatus
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "HealthAPIService.HealthCheckOperationId")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/healthz"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
156
sdk/go/docs/AnnotationsAPI.md
Normal file
156
sdk/go/docs/AnnotationsAPI.md
Normal file
@@ -0,0 +1,156 @@
|
||||
# \AnnotationsAPI
|
||||
|
||||
All URIs are relative to *http://localhost:8080/api/v1*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**GetAnnotation**](AnnotationsAPI.md#GetAnnotation) | **Get** /annotations/{id} | Get annotation by ID (org scoped)
|
||||
[**ListAnnotations**](AnnotationsAPI.md#ListAnnotations) | **Get** /annotations | List annotations (org scoped)
|
||||
|
||||
|
||||
|
||||
## GetAnnotation
|
||||
|
||||
> DtoAnnotationResponse GetAnnotation(ctx, id).XOrgID(xOrgID).Include(include).Execute()
|
||||
|
||||
Get annotation by ID (org scoped)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "github.com/glueops/autoglue-sdk-go"
|
||||
)
|
||||
|
||||
func main() {
|
||||
id := "id_example" // string | Annotation ID (UUID)
|
||||
xOrgID := "xOrgID_example" // string | Organization UUID (optional)
|
||||
include := "include_example" // string | Optional: node_pools (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.AnnotationsAPI.GetAnnotation(context.Background(), id).XOrgID(xOrgID).Include(include).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `AnnotationsAPI.GetAnnotation``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `GetAnnotation`: DtoAnnotationResponse
|
||||
fmt.Fprintf(os.Stdout, "Response from `AnnotationsAPI.GetAnnotation`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**id** | **string** | Annotation ID (UUID) |
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiGetAnnotationRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
**xOrgID** | **string** | Organization UUID |
|
||||
**include** | **string** | Optional: node_pools |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DtoAnnotationResponse**](DtoAnnotationResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## ListAnnotations
|
||||
|
||||
> []DtoAnnotationResponse ListAnnotations(ctx).XOrgID(xOrgID).Name(name).Value(value).Q(q).Execute()
|
||||
|
||||
List annotations (org scoped)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "github.com/glueops/autoglue-sdk-go"
|
||||
)
|
||||
|
||||
func main() {
|
||||
xOrgID := "xOrgID_example" // string | Organization UUID (optional)
|
||||
name := "name_example" // string | Exact name (optional)
|
||||
value := "value_example" // string | Exact value (optional)
|
||||
q := "q_example" // string | name contains (case-insensitive) (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.AnnotationsAPI.ListAnnotations(context.Background()).XOrgID(xOrgID).Name(name).Value(value).Q(q).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `AnnotationsAPI.ListAnnotations``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `ListAnnotations`: []DtoAnnotationResponse
|
||||
fmt.Fprintf(os.Stdout, "Response from `AnnotationsAPI.ListAnnotations`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiListAnnotationsRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**xOrgID** | **string** | Organization UUID |
|
||||
**name** | **string** | Exact name |
|
||||
**value** | **string** | Exact value |
|
||||
**q** | **string** | name contains (case-insensitive) |
|
||||
|
||||
### Return type
|
||||
|
||||
[**[]DtoAnnotationResponse**](DtoAnnotationResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
186
sdk/go/docs/DtoAnnotationResponse.md
Normal file
186
sdk/go/docs/DtoAnnotationResponse.md
Normal file
@@ -0,0 +1,186 @@
|
||||
# DtoAnnotationResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**CreatedAt** | Pointer to **string** | | [optional]
|
||||
**Id** | Pointer to **string** | | [optional]
|
||||
**Key** | Pointer to **string** | | [optional]
|
||||
**OrganizationId** | Pointer to **string** | | [optional]
|
||||
**UpdatedAt** | Pointer to **string** | | [optional]
|
||||
**Value** | Pointer to **string** | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewDtoAnnotationResponse
|
||||
|
||||
`func NewDtoAnnotationResponse() *DtoAnnotationResponse`
|
||||
|
||||
NewDtoAnnotationResponse instantiates a new DtoAnnotationResponse object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewDtoAnnotationResponseWithDefaults
|
||||
|
||||
`func NewDtoAnnotationResponseWithDefaults() *DtoAnnotationResponse`
|
||||
|
||||
NewDtoAnnotationResponseWithDefaults instantiates a new DtoAnnotationResponse object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetCreatedAt
|
||||
|
||||
`func (o *DtoAnnotationResponse) GetCreatedAt() string`
|
||||
|
||||
GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise.
|
||||
|
||||
### GetCreatedAtOk
|
||||
|
||||
`func (o *DtoAnnotationResponse) GetCreatedAtOk() (*string, bool)`
|
||||
|
||||
GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetCreatedAt
|
||||
|
||||
`func (o *DtoAnnotationResponse) SetCreatedAt(v string)`
|
||||
|
||||
SetCreatedAt sets CreatedAt field to given value.
|
||||
|
||||
### HasCreatedAt
|
||||
|
||||
`func (o *DtoAnnotationResponse) HasCreatedAt() bool`
|
||||
|
||||
HasCreatedAt returns a boolean if a field has been set.
|
||||
|
||||
### GetId
|
||||
|
||||
`func (o *DtoAnnotationResponse) GetId() string`
|
||||
|
||||
GetId returns the Id field if non-nil, zero value otherwise.
|
||||
|
||||
### GetIdOk
|
||||
|
||||
`func (o *DtoAnnotationResponse) GetIdOk() (*string, bool)`
|
||||
|
||||
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetId
|
||||
|
||||
`func (o *DtoAnnotationResponse) SetId(v string)`
|
||||
|
||||
SetId sets Id field to given value.
|
||||
|
||||
### HasId
|
||||
|
||||
`func (o *DtoAnnotationResponse) HasId() bool`
|
||||
|
||||
HasId returns a boolean if a field has been set.
|
||||
|
||||
### GetKey
|
||||
|
||||
`func (o *DtoAnnotationResponse) GetKey() string`
|
||||
|
||||
GetKey returns the Key field if non-nil, zero value otherwise.
|
||||
|
||||
### GetKeyOk
|
||||
|
||||
`func (o *DtoAnnotationResponse) GetKeyOk() (*string, bool)`
|
||||
|
||||
GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetKey
|
||||
|
||||
`func (o *DtoAnnotationResponse) SetKey(v string)`
|
||||
|
||||
SetKey sets Key field to given value.
|
||||
|
||||
### HasKey
|
||||
|
||||
`func (o *DtoAnnotationResponse) HasKey() bool`
|
||||
|
||||
HasKey returns a boolean if a field has been set.
|
||||
|
||||
### GetOrganizationId
|
||||
|
||||
`func (o *DtoAnnotationResponse) GetOrganizationId() string`
|
||||
|
||||
GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise.
|
||||
|
||||
### GetOrganizationIdOk
|
||||
|
||||
`func (o *DtoAnnotationResponse) GetOrganizationIdOk() (*string, bool)`
|
||||
|
||||
GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetOrganizationId
|
||||
|
||||
`func (o *DtoAnnotationResponse) SetOrganizationId(v string)`
|
||||
|
||||
SetOrganizationId sets OrganizationId field to given value.
|
||||
|
||||
### HasOrganizationId
|
||||
|
||||
`func (o *DtoAnnotationResponse) HasOrganizationId() bool`
|
||||
|
||||
HasOrganizationId returns a boolean if a field has been set.
|
||||
|
||||
### GetUpdatedAt
|
||||
|
||||
`func (o *DtoAnnotationResponse) GetUpdatedAt() string`
|
||||
|
||||
GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise.
|
||||
|
||||
### GetUpdatedAtOk
|
||||
|
||||
`func (o *DtoAnnotationResponse) GetUpdatedAtOk() (*string, bool)`
|
||||
|
||||
GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetUpdatedAt
|
||||
|
||||
`func (o *DtoAnnotationResponse) SetUpdatedAt(v string)`
|
||||
|
||||
SetUpdatedAt sets UpdatedAt field to given value.
|
||||
|
||||
### HasUpdatedAt
|
||||
|
||||
`func (o *DtoAnnotationResponse) HasUpdatedAt() bool`
|
||||
|
||||
HasUpdatedAt returns a boolean if a field has been set.
|
||||
|
||||
### GetValue
|
||||
|
||||
`func (o *DtoAnnotationResponse) GetValue() string`
|
||||
|
||||
GetValue returns the Value field if non-nil, zero value otherwise.
|
||||
|
||||
### GetValueOk
|
||||
|
||||
`func (o *DtoAnnotationResponse) GetValueOk() (*string, bool)`
|
||||
|
||||
GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetValue
|
||||
|
||||
`func (o *DtoAnnotationResponse) SetValue(v string)`
|
||||
|
||||
SetValue sets Value field to given value.
|
||||
|
||||
### HasValue
|
||||
|
||||
`func (o *DtoAnnotationResponse) HasValue() bool`
|
||||
|
||||
HasValue returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
56
sdk/go/docs/HandlersHealthStatus.md
Normal file
56
sdk/go/docs/HandlersHealthStatus.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# HandlersHealthStatus
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Status** | Pointer to **string** | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewHandlersHealthStatus
|
||||
|
||||
`func NewHandlersHealthStatus() *HandlersHealthStatus`
|
||||
|
||||
NewHandlersHealthStatus instantiates a new HandlersHealthStatus object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewHandlersHealthStatusWithDefaults
|
||||
|
||||
`func NewHandlersHealthStatusWithDefaults() *HandlersHealthStatus`
|
||||
|
||||
NewHandlersHealthStatusWithDefaults instantiates a new HandlersHealthStatus object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetStatus
|
||||
|
||||
`func (o *HandlersHealthStatus) GetStatus() string`
|
||||
|
||||
GetStatus returns the Status field if non-nil, zero value otherwise.
|
||||
|
||||
### GetStatusOk
|
||||
|
||||
`func (o *HandlersHealthStatus) GetStatusOk() (*string, bool)`
|
||||
|
||||
GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetStatus
|
||||
|
||||
`func (o *HandlersHealthStatus) SetStatus(v string)`
|
||||
|
||||
SetStatus sets Status field to given value.
|
||||
|
||||
### HasStatus
|
||||
|
||||
`func (o *HandlersHealthStatus) HasStatus() bool`
|
||||
|
||||
HasStatus returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
70
sdk/go/docs/HealthAPI.md
Normal file
70
sdk/go/docs/HealthAPI.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# \HealthAPI
|
||||
|
||||
All URIs are relative to *http://localhost:8080/api/v1*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**HealthCheckOperationId**](HealthAPI.md#HealthCheckOperationId) | **Get** /healthz | Basic health check
|
||||
|
||||
|
||||
|
||||
## HealthCheckOperationId
|
||||
|
||||
> HandlersHealthStatus HealthCheckOperationId(ctx).Execute()
|
||||
|
||||
Basic health check
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "github.com/glueops/autoglue-sdk-go"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.HealthAPI.HealthCheckOperationId(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `HealthAPI.HealthCheckOperationId``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `HealthCheckOperationId`: HandlersHealthStatus
|
||||
fmt.Fprintf(os.Stdout, "Response from `HealthAPI.HealthCheckOperationId`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiHealthCheckOperationIdRequest struct via the builder pattern
|
||||
|
||||
|
||||
### Return type
|
||||
|
||||
[**HandlersHealthStatus**](HandlersHealthStatus.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
304
sdk/go/model_dto_annotation_response.go
Normal file
304
sdk/go/model_dto_annotation_response.go
Normal file
@@ -0,0 +1,304 @@
|
||||
/*
|
||||
AutoGlue API
|
||||
|
||||
API for managing K3s clusters across cloud providers
|
||||
|
||||
API version: 1.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package autoglue
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the DtoAnnotationResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &DtoAnnotationResponse{}
|
||||
|
||||
// DtoAnnotationResponse struct for DtoAnnotationResponse
|
||||
type DtoAnnotationResponse struct {
|
||||
CreatedAt *string `json:"created_at,omitempty"`
|
||||
Id *string `json:"id,omitempty"`
|
||||
Key *string `json:"key,omitempty"`
|
||||
OrganizationId *string `json:"organization_id,omitempty"`
|
||||
UpdatedAt *string `json:"updated_at,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// NewDtoAnnotationResponse instantiates a new DtoAnnotationResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewDtoAnnotationResponse() *DtoAnnotationResponse {
|
||||
this := DtoAnnotationResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewDtoAnnotationResponseWithDefaults instantiates a new DtoAnnotationResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewDtoAnnotationResponseWithDefaults() *DtoAnnotationResponse {
|
||||
this := DtoAnnotationResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *DtoAnnotationResponse) GetCreatedAt() string {
|
||||
if o == nil || IsNil(o.CreatedAt) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.CreatedAt
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DtoAnnotationResponse) GetCreatedAtOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.CreatedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.CreatedAt, true
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *DtoAnnotationResponse) HasCreatedAt() bool {
|
||||
if o != nil && !IsNil(o.CreatedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
|
||||
func (o *DtoAnnotationResponse) SetCreatedAt(v string) {
|
||||
o.CreatedAt = &v
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *DtoAnnotationResponse) GetId() string {
|
||||
if o == nil || IsNil(o.Id) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DtoAnnotationResponse) GetIdOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Id) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Id, true
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *DtoAnnotationResponse) HasId() bool {
|
||||
if o != nil && !IsNil(o.Id) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *DtoAnnotationResponse) SetId(v string) {
|
||||
o.Id = &v
|
||||
}
|
||||
|
||||
// GetKey returns the Key field value if set, zero value otherwise.
|
||||
func (o *DtoAnnotationResponse) GetKey() string {
|
||||
if o == nil || IsNil(o.Key) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Key
|
||||
}
|
||||
|
||||
// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DtoAnnotationResponse) GetKeyOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Key) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Key, true
|
||||
}
|
||||
|
||||
// HasKey returns a boolean if a field has been set.
|
||||
func (o *DtoAnnotationResponse) HasKey() bool {
|
||||
if o != nil && !IsNil(o.Key) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetKey gets a reference to the given string and assigns it to the Key field.
|
||||
func (o *DtoAnnotationResponse) SetKey(v string) {
|
||||
o.Key = &v
|
||||
}
|
||||
|
||||
// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise.
|
||||
func (o *DtoAnnotationResponse) GetOrganizationId() string {
|
||||
if o == nil || IsNil(o.OrganizationId) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.OrganizationId
|
||||
}
|
||||
|
||||
// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DtoAnnotationResponse) GetOrganizationIdOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.OrganizationId) {
|
||||
return nil, false
|
||||
}
|
||||
return o.OrganizationId, true
|
||||
}
|
||||
|
||||
// HasOrganizationId returns a boolean if a field has been set.
|
||||
func (o *DtoAnnotationResponse) HasOrganizationId() bool {
|
||||
if o != nil && !IsNil(o.OrganizationId) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field.
|
||||
func (o *DtoAnnotationResponse) SetOrganizationId(v string) {
|
||||
o.OrganizationId = &v
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *DtoAnnotationResponse) GetUpdatedAt() string {
|
||||
if o == nil || IsNil(o.UpdatedAt) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.UpdatedAt
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DtoAnnotationResponse) GetUpdatedAtOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.UpdatedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UpdatedAt, true
|
||||
}
|
||||
|
||||
// HasUpdatedAt returns a boolean if a field has been set.
|
||||
func (o *DtoAnnotationResponse) HasUpdatedAt() bool {
|
||||
if o != nil && !IsNil(o.UpdatedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field.
|
||||
func (o *DtoAnnotationResponse) SetUpdatedAt(v string) {
|
||||
o.UpdatedAt = &v
|
||||
}
|
||||
|
||||
// GetValue returns the Value field value if set, zero value otherwise.
|
||||
func (o *DtoAnnotationResponse) GetValue() string {
|
||||
if o == nil || IsNil(o.Value) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Value
|
||||
}
|
||||
|
||||
// GetValueOk returns a tuple with the Value field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DtoAnnotationResponse) GetValueOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Value) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Value, true
|
||||
}
|
||||
|
||||
// HasValue returns a boolean if a field has been set.
|
||||
func (o *DtoAnnotationResponse) HasValue() bool {
|
||||
if o != nil && !IsNil(o.Value) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetValue gets a reference to the given string and assigns it to the Value field.
|
||||
func (o *DtoAnnotationResponse) SetValue(v string) {
|
||||
o.Value = &v
|
||||
}
|
||||
|
||||
func (o DtoAnnotationResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o DtoAnnotationResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.CreatedAt) {
|
||||
toSerialize["created_at"] = o.CreatedAt
|
||||
}
|
||||
if !IsNil(o.Id) {
|
||||
toSerialize["id"] = o.Id
|
||||
}
|
||||
if !IsNil(o.Key) {
|
||||
toSerialize["key"] = o.Key
|
||||
}
|
||||
if !IsNil(o.OrganizationId) {
|
||||
toSerialize["organization_id"] = o.OrganizationId
|
||||
}
|
||||
if !IsNil(o.UpdatedAt) {
|
||||
toSerialize["updated_at"] = o.UpdatedAt
|
||||
}
|
||||
if !IsNil(o.Value) {
|
||||
toSerialize["value"] = o.Value
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableDtoAnnotationResponse struct {
|
||||
value *DtoAnnotationResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDtoAnnotationResponse) Get() *DtoAnnotationResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDtoAnnotationResponse) Set(val *DtoAnnotationResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDtoAnnotationResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDtoAnnotationResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDtoAnnotationResponse(val *DtoAnnotationResponse) *NullableDtoAnnotationResponse {
|
||||
return &NullableDtoAnnotationResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDtoAnnotationResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDtoAnnotationResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
124
sdk/go/model_handlers_health_status.go
Normal file
124
sdk/go/model_handlers_health_status.go
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
AutoGlue API
|
||||
|
||||
API for managing K3s clusters across cloud providers
|
||||
|
||||
API version: 1.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package autoglue
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the HandlersHealthStatus type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &HandlersHealthStatus{}
|
||||
|
||||
// HandlersHealthStatus struct for HandlersHealthStatus
|
||||
type HandlersHealthStatus struct {
|
||||
Status *string `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// NewHandlersHealthStatus instantiates a new HandlersHealthStatus object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewHandlersHealthStatus() *HandlersHealthStatus {
|
||||
this := HandlersHealthStatus{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewHandlersHealthStatusWithDefaults instantiates a new HandlersHealthStatus object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewHandlersHealthStatusWithDefaults() *HandlersHealthStatus {
|
||||
this := HandlersHealthStatus{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *HandlersHealthStatus) GetStatus() string {
|
||||
if o == nil || IsNil(o.Status) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Status
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *HandlersHealthStatus) GetStatusOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Status) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Status, true
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *HandlersHealthStatus) HasStatus() bool {
|
||||
if o != nil && !IsNil(o.Status) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||
func (o *HandlersHealthStatus) SetStatus(v string) {
|
||||
o.Status = &v
|
||||
}
|
||||
|
||||
func (o HandlersHealthStatus) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o HandlersHealthStatus) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Status) {
|
||||
toSerialize["status"] = o.Status
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableHandlersHealthStatus struct {
|
||||
value *HandlersHealthStatus
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableHandlersHealthStatus) Get() *HandlersHealthStatus {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableHandlersHealthStatus) Set(val *HandlersHealthStatus) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableHandlersHealthStatus) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableHandlersHealthStatus) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableHandlersHealthStatus(val *HandlersHealthStatus) *NullableHandlersHealthStatus {
|
||||
return &NullableHandlersHealthStatus{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableHandlersHealthStatus) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableHandlersHealthStatus) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
51
sdk/go/test/api_annotations_test.go
Normal file
51
sdk/go/test/api_annotations_test.go
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
AutoGlue API
|
||||
|
||||
Testing AnnotationsAPIService
|
||||
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||
|
||||
package autoglue
|
||||
|
||||
import (
|
||||
"context"
|
||||
openapiclient "github.com/glueops/autoglue-sdk-go"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_autoglue_AnnotationsAPIService(t *testing.T) {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
|
||||
t.Run("Test AnnotationsAPIService GetAnnotation", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
|
||||
resp, httpRes, err := apiClient.AnnotationsAPI.GetAnnotation(context.Background(), id).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test AnnotationsAPIService ListAnnotations", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.AnnotationsAPI.ListAnnotations(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
37
sdk/go/test/api_health_test.go
Normal file
37
sdk/go/test/api_health_test.go
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
AutoGlue API
|
||||
|
||||
Testing HealthAPIService
|
||||
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||
|
||||
package autoglue
|
||||
|
||||
import (
|
||||
"context"
|
||||
openapiclient "github.com/glueops/autoglue-sdk-go"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_autoglue_HealthAPIService(t *testing.T) {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
|
||||
t.Run("Test HealthAPIService HealthCheckOperationId", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.HealthAPI.HealthCheckOperationId(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user