openapi

package
v0.0.0-...-268cd68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

README

Go API client for openapi

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

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: 0.0.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 sw "./openapi"

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(), sw.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(), sw.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 identifield 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(), sw.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://localhost/api/v1

Class Method HTTP request Description
InstancesApi GetInstances Get /targets/{target}/instances Get Instances for a ScrapeTarget
InstancesApi SaveInstances Put /targets/{target}/instances Update Instances for a ScrapeTarget
TargetsApi ListScrapeTargets Get /targets List ScrapeTargets

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKeys takes a string apikey as authentication for the request
	ContextAPIKeys = contextKey("apiKeys")

	// ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request.
	ContextHttpSignatureAuth = contextKey("httpsignature")

	// ContextServerIndex uses a server configuration from the index.
	ContextServerIndex = contextKey("serverIndex")

	// ContextOperationServerIndices uses a server configuration from the index mapping.
	ContextOperationServerIndices = contextKey("serverOperationIndices")

	// ContextServerVariables overrides a server configuration variables.
	ContextServerVariables = contextKey("serverVariables")

	// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
	ContextOperationServerVariables = contextKey("serverOperationVariables")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

func PtrBool

func PtrBool(v bool) *bool

PtrBool is a helper routine that returns a pointer to given boolean value.

func PtrFloat32

func PtrFloat32(v float32) *float32

PtrFloat32 is a helper routine that returns a pointer to given float value.

func PtrFloat64

func PtrFloat64(v float64) *float64

PtrFloat64 is a helper routine that returns a pointer to given float value.

func PtrInt

func PtrInt(v int) *int

PtrInt is a helper routine that returns a pointer to given integer value.

func PtrInt32

func PtrInt32(v int32) *int32

PtrInt32 is a helper routine that returns a pointer to given integer value.

func PtrInt64

func PtrInt64(v int64) *int64

PtrInt64 is a helper routine that returns a pointer to given integer value.

func PtrString

func PtrString(v string) *string

PtrString is a helper routine that returns a pointer to given string value.

func PtrTime

func PtrTime(v time.Time) *time.Time

PtrTime is helper routine that returns a pointer to given Time value.

Types

type APIClient

type APIClient struct {
	InstancesApi *InstancesApiService

	TargetsApi *TargetsApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Cloudburst API v0.0.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResonse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type ApiGetInstancesRequest

type ApiGetInstancesRequest struct {
	ApiService *InstancesApiService
	// contains filtered or unexported fields
}

func (ApiGetInstancesRequest) Execute

type ApiListScrapeTargetsRequest

type ApiListScrapeTargetsRequest struct {
	ApiService *TargetsApiService
	// contains filtered or unexported fields
}

func (ApiListScrapeTargetsRequest) Execute

type ApiSaveInstancesRequest

type ApiSaveInstancesRequest struct {
	ApiService *InstancesApiService
	// contains filtered or unexported fields
}

func (ApiSaveInstancesRequest) Execute

func (ApiSaveInstancesRequest) Instance

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	Host             string            `json:"host,omitempty"`
	Scheme           string            `json:"scheme,omitempty"`
	DefaultHeader    map[string]string `json:"defaultHeader,omitempty"`
	UserAgent        string            `json:"userAgent,omitempty"`
	Debug            bool              `json:"debug,omitempty"`
	Servers          ServerConfigurations
	OperationServers map[string]ServerConfigurations
	HTTPClient       *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerURL

func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error)

ServerURL returns URL based on server settings

func (*Configuration) ServerURLWithContext

func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error)

ServerURLWithContext returns a new server URL given an endpoint

type ContainerSpec

type ContainerSpec struct {
	Name  string `json:"name"`
	Image string `json:"image"`
}

ContainerSpec struct for ContainerSpec

func NewContainerSpec

func NewContainerSpec(name string, image string) *ContainerSpec

NewContainerSpec instantiates a new ContainerSpec 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 NewContainerSpecWithDefaults

func NewContainerSpecWithDefaults() *ContainerSpec

NewContainerSpecWithDefaults instantiates a new ContainerSpec 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 (*ContainerSpec) GetImage

func (o *ContainerSpec) GetImage() string

GetImage returns the Image field value

func (*ContainerSpec) GetImageOk

func (o *ContainerSpec) GetImageOk() (*string, bool)

GetImageOk returns a tuple with the Image field value and a boolean to check if the value has been set.

func (*ContainerSpec) GetName

func (o *ContainerSpec) GetName() string

GetName returns the Name field value

func (*ContainerSpec) GetNameOk

func (o *ContainerSpec) GetNameOk() (*string, bool)

GetNameOk returns a tuple with the Name field value and a boolean to check if the value has been set.

func (ContainerSpec) MarshalJSON

func (o ContainerSpec) MarshalJSON() ([]byte, error)

func (*ContainerSpec) SetImage

func (o *ContainerSpec) SetImage(v string)

SetImage sets field value

func (*ContainerSpec) SetName

func (o *ContainerSpec) SetName(v string)

SetName sets field value

type GenericOpenAPIError

type GenericOpenAPIError struct {
	// contains filtered or unexported fields
}

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type Instance

type Instance struct {
	Name      string         `json:"name"`
	Endpoint  string         `json:"endpoint"`
	Provider  string         `json:"provider"`
	Active    bool           `json:"active"`
	Container ContainerSpec  `json:"container"`
	Status    InstanceStatus `json:"status"`
}

Instance struct for Instance

func NewInstance

func NewInstance(name string, endpoint string, provider string, active bool, container ContainerSpec, status InstanceStatus) *Instance

NewInstance instantiates a new Instance 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 NewInstanceWithDefaults

func NewInstanceWithDefaults() *Instance

NewInstanceWithDefaults instantiates a new Instance 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 (*Instance) GetActive

func (o *Instance) GetActive() bool

GetActive returns the Active field value

func (*Instance) GetActiveOk

func (o *Instance) GetActiveOk() (*bool, bool)

GetActiveOk returns a tuple with the Active field value and a boolean to check if the value has been set.

func (*Instance) GetContainer

func (o *Instance) GetContainer() ContainerSpec

GetContainer returns the Container field value

func (*Instance) GetContainerOk

func (o *Instance) GetContainerOk() (*ContainerSpec, bool)

GetContainerOk returns a tuple with the Container field value and a boolean to check if the value has been set.

func (*Instance) GetEndpoint

func (o *Instance) GetEndpoint() string

GetEndpoint returns the Endpoint field value

func (*Instance) GetEndpointOk

func (o *Instance) GetEndpointOk() (*string, bool)

GetEndpointOk returns a tuple with the Endpoint field value and a boolean to check if the value has been set.

func (*Instance) GetName

func (o *Instance) GetName() string

GetName returns the Name field value

func (*Instance) GetNameOk

func (o *Instance) GetNameOk() (*string, bool)

GetNameOk returns a tuple with the Name field value and a boolean to check if the value has been set.

func (*Instance) GetProvider

func (o *Instance) GetProvider() string

GetProvider returns the Provider field value

func (*Instance) GetProviderOk

func (o *Instance) GetProviderOk() (*string, bool)

GetProviderOk returns a tuple with the Provider field value and a boolean to check if the value has been set.

func (*Instance) GetStatus

func (o *Instance) GetStatus() InstanceStatus

GetStatus returns the Status field value

func (*Instance) GetStatusOk

func (o *Instance) GetStatusOk() (*InstanceStatus, bool)

GetStatusOk returns a tuple with the Status field value and a boolean to check if the value has been set.

func (Instance) MarshalJSON

func (o Instance) MarshalJSON() ([]byte, error)

func (*Instance) SetActive

func (o *Instance) SetActive(v bool)

SetActive sets field value

func (*Instance) SetContainer

func (o *Instance) SetContainer(v ContainerSpec)

SetContainer sets field value

func (*Instance) SetEndpoint

func (o *Instance) SetEndpoint(v string)

SetEndpoint sets field value

func (*Instance) SetName

func (o *Instance) SetName(v string)

SetName sets field value

func (*Instance) SetProvider

func (o *Instance) SetProvider(v string)

SetProvider sets field value

func (*Instance) SetStatus

func (o *Instance) SetStatus(v InstanceStatus)

SetStatus sets field value

type InstanceEvent

type InstanceEvent struct {
	Type   string     `json:"type"`
	Target string     `json:"target"`
	Data   []Instance `json:"data"`
}

InstanceEvent struct for InstanceEvent

func NewInstanceEvent

func NewInstanceEvent(type_ string, target string, data []Instance) *InstanceEvent

NewInstanceEvent instantiates a new InstanceEvent 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 NewInstanceEventWithDefaults

func NewInstanceEventWithDefaults() *InstanceEvent

NewInstanceEventWithDefaults instantiates a new InstanceEvent 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 (*InstanceEvent) GetData

func (o *InstanceEvent) GetData() []Instance

GetData returns the Data field value

func (*InstanceEvent) GetDataOk

func (o *InstanceEvent) GetDataOk() (*[]Instance, bool)

GetDataOk returns a tuple with the Data field value and a boolean to check if the value has been set.

func (*InstanceEvent) GetTarget

func (o *InstanceEvent) GetTarget() string

GetTarget returns the Target field value

func (*InstanceEvent) GetTargetOk

func (o *InstanceEvent) GetTargetOk() (*string, bool)

GetTargetOk returns a tuple with the Target field value and a boolean to check if the value has been set.

func (*InstanceEvent) GetType

func (o *InstanceEvent) GetType() string

GetType returns the Type field value

func (*InstanceEvent) GetTypeOk

func (o *InstanceEvent) GetTypeOk() (*string, bool)

GetTypeOk returns a tuple with the Type field value and a boolean to check if the value has been set.

func (InstanceEvent) MarshalJSON

func (o InstanceEvent) MarshalJSON() ([]byte, error)

func (*InstanceEvent) SetData

func (o *InstanceEvent) SetData(v []Instance)

SetData sets field value

func (*InstanceEvent) SetTarget

func (o *InstanceEvent) SetTarget(v string)

SetTarget sets field value

func (*InstanceEvent) SetType

func (o *InstanceEvent) SetType(v string)

SetType sets field value

type InstanceSpec

type InstanceSpec struct {
	Container ContainerSpec `json:"container"`
}

InstanceSpec struct for InstanceSpec

func NewInstanceSpec

func NewInstanceSpec(container ContainerSpec) *InstanceSpec

NewInstanceSpec instantiates a new InstanceSpec 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 NewInstanceSpecWithDefaults

func NewInstanceSpecWithDefaults() *InstanceSpec

NewInstanceSpecWithDefaults instantiates a new InstanceSpec 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 (*InstanceSpec) GetContainer

func (o *InstanceSpec) GetContainer() ContainerSpec

GetContainer returns the Container field value

func (*InstanceSpec) GetContainerOk

func (o *InstanceSpec) GetContainerOk() (*ContainerSpec, bool)

GetContainerOk returns a tuple with the Container field value and a boolean to check if the value has been set.

func (InstanceSpec) MarshalJSON

func (o InstanceSpec) MarshalJSON() ([]byte, error)

func (*InstanceSpec) SetContainer

func (o *InstanceSpec) SetContainer(v ContainerSpec)

SetContainer sets field value

type InstanceStatus

type InstanceStatus struct {
	Agent   string    `json:"agent"`
	Status  string    `json:"status"`
	Started time.Time `json:"started"`
}

InstanceStatus struct for InstanceStatus

func NewInstanceStatus

func NewInstanceStatus(agent string, status string, started time.Time) *InstanceStatus

NewInstanceStatus instantiates a new InstanceStatus 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 NewInstanceStatusWithDefaults

func NewInstanceStatusWithDefaults() *InstanceStatus

NewInstanceStatusWithDefaults instantiates a new InstanceStatus 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 (*InstanceStatus) GetAgent

func (o *InstanceStatus) GetAgent() string

GetAgent returns the Agent field value

func (*InstanceStatus) GetAgentOk

func (o *InstanceStatus) GetAgentOk() (*string, bool)

GetAgentOk returns a tuple with the Agent field value and a boolean to check if the value has been set.

func (*InstanceStatus) GetStarted

func (o *InstanceStatus) GetStarted() time.Time

GetStarted returns the Started field value

func (*InstanceStatus) GetStartedOk

func (o *InstanceStatus) GetStartedOk() (*time.Time, bool)

GetStartedOk returns a tuple with the Started field value and a boolean to check if the value has been set.

func (*InstanceStatus) GetStatus

func (o *InstanceStatus) GetStatus() string

GetStatus returns the Status field value

func (*InstanceStatus) GetStatusOk

func (o *InstanceStatus) GetStatusOk() (*string, bool)

GetStatusOk returns a tuple with the Status field value and a boolean to check if the value has been set.

func (InstanceStatus) MarshalJSON

func (o InstanceStatus) MarshalJSON() ([]byte, error)

func (*InstanceStatus) SetAgent

func (o *InstanceStatus) SetAgent(v string)

SetAgent sets field value

func (*InstanceStatus) SetStarted

func (o *InstanceStatus) SetStarted(v time.Time)

SetStarted sets field value

func (*InstanceStatus) SetStatus

func (o *InstanceStatus) SetStatus(v string)

SetStatus sets field value

type InstancesApiService

type InstancesApiService service

InstancesApiService InstancesApi service

func (*InstancesApiService) GetInstances

func (a *InstancesApiService) GetInstances(ctx _context.Context, target string) ApiGetInstancesRequest

* GetInstances Get InstanceDemand for a ScrapeTarget * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param target * @return ApiGetInstancesRequest

func (*InstancesApiService) GetInstancesExecute

func (a *InstancesApiService) GetInstancesExecute(r ApiGetInstancesRequest) ([]Instance, *_nethttp.Response, error)

* Execute executes the request * @return []Instance

func (*InstancesApiService) SaveInstances

func (a *InstancesApiService) SaveInstances(ctx _context.Context, target string) ApiSaveInstancesRequest

* SaveInstances Update InstanceDemand for a ScrapeTarget * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param target * @return ApiSaveInstancesRequest

func (*InstancesApiService) SaveInstancesExecute

func (a *InstancesApiService) SaveInstancesExecute(r ApiSaveInstancesRequest) ([]Instance, *_nethttp.Response, error)

* Execute executes the request * @return []Instance

type NullableBool

type NullableBool struct {
	// contains filtered or unexported fields
}

func NewNullableBool

func NewNullableBool(val *bool) *NullableBool

func (NullableBool) Get

func (v NullableBool) Get() *bool

func (NullableBool) IsSet

func (v NullableBool) IsSet() bool

func (NullableBool) MarshalJSON

func (v NullableBool) MarshalJSON() ([]byte, error)

func (*NullableBool) Set

func (v *NullableBool) Set(val *bool)

func (*NullableBool) UnmarshalJSON

func (v *NullableBool) UnmarshalJSON(src []byte) error

func (*NullableBool) Unset

func (v *NullableBool) Unset()

type NullableContainerSpec

type NullableContainerSpec struct {
	// contains filtered or unexported fields
}

func NewNullableContainerSpec

func NewNullableContainerSpec(val *ContainerSpec) *NullableContainerSpec

func (NullableContainerSpec) Get

func (NullableContainerSpec) IsSet

func (v NullableContainerSpec) IsSet() bool

func (NullableContainerSpec) MarshalJSON

func (v NullableContainerSpec) MarshalJSON() ([]byte, error)

func (*NullableContainerSpec) Set

func (v *NullableContainerSpec) Set(val *ContainerSpec)

func (*NullableContainerSpec) UnmarshalJSON

func (v *NullableContainerSpec) UnmarshalJSON(src []byte) error

func (*NullableContainerSpec) Unset

func (v *NullableContainerSpec) Unset()

type NullableFloat32

type NullableFloat32 struct {
	// contains filtered or unexported fields
}

func NewNullableFloat32

func NewNullableFloat32(val *float32) *NullableFloat32

func (NullableFloat32) Get

func (v NullableFloat32) Get() *float32

func (NullableFloat32) IsSet

func (v NullableFloat32) IsSet() bool

func (NullableFloat32) MarshalJSON

func (v NullableFloat32) MarshalJSON() ([]byte, error)

func (*NullableFloat32) Set

func (v *NullableFloat32) Set(val *float32)

func (*NullableFloat32) UnmarshalJSON

func (v *NullableFloat32) UnmarshalJSON(src []byte) error

func (*NullableFloat32) Unset

func (v *NullableFloat32) Unset()

type NullableFloat64

type NullableFloat64 struct {
	// contains filtered or unexported fields
}

func NewNullableFloat64

func NewNullableFloat64(val *float64) *NullableFloat64

func (NullableFloat64) Get

func (v NullableFloat64) Get() *float64

func (NullableFloat64) IsSet

func (v NullableFloat64) IsSet() bool

func (NullableFloat64) MarshalJSON

func (v NullableFloat64) MarshalJSON() ([]byte, error)

func (*NullableFloat64) Set

func (v *NullableFloat64) Set(val *float64)

func (*NullableFloat64) UnmarshalJSON

func (v *NullableFloat64) UnmarshalJSON(src []byte) error

func (*NullableFloat64) Unset

func (v *NullableFloat64) Unset()

type NullableInstance

type NullableInstance struct {
	// contains filtered or unexported fields
}

func NewNullableInstance

func NewNullableInstance(val *Instance) *NullableInstance

func (NullableInstance) Get

func (v NullableInstance) Get() *Instance

func (NullableInstance) IsSet

func (v NullableInstance) IsSet() bool

func (NullableInstance) MarshalJSON

func (v NullableInstance) MarshalJSON() ([]byte, error)

func (*NullableInstance) Set

func (v *NullableInstance) Set(val *Instance)

func (*NullableInstance) UnmarshalJSON

func (v *NullableInstance) UnmarshalJSON(src []byte) error

func (*NullableInstance) Unset

func (v *NullableInstance) Unset()

type NullableInstanceEvent

type NullableInstanceEvent struct {
	// contains filtered or unexported fields
}

func NewNullableInstanceEvent

func NewNullableInstanceEvent(val *InstanceEvent) *NullableInstanceEvent

func (NullableInstanceEvent) Get

func (NullableInstanceEvent) IsSet

func (v NullableInstanceEvent) IsSet() bool

func (NullableInstanceEvent) MarshalJSON

func (v NullableInstanceEvent) MarshalJSON() ([]byte, error)

func (*NullableInstanceEvent) Set

func (v *NullableInstanceEvent) Set(val *InstanceEvent)

func (*NullableInstanceEvent) UnmarshalJSON

func (v *NullableInstanceEvent) UnmarshalJSON(src []byte) error

func (*NullableInstanceEvent) Unset

func (v *NullableInstanceEvent) Unset()

type NullableInstanceSpec

type NullableInstanceSpec struct {
	// contains filtered or unexported fields
}

func NewNullableInstanceSpec

func NewNullableInstanceSpec(val *InstanceSpec) *NullableInstanceSpec

func (NullableInstanceSpec) Get

func (NullableInstanceSpec) IsSet

func (v NullableInstanceSpec) IsSet() bool

func (NullableInstanceSpec) MarshalJSON

func (v NullableInstanceSpec) MarshalJSON() ([]byte, error)

func (*NullableInstanceSpec) Set

func (v *NullableInstanceSpec) Set(val *InstanceSpec)

func (*NullableInstanceSpec) UnmarshalJSON

func (v *NullableInstanceSpec) UnmarshalJSON(src []byte) error

func (*NullableInstanceSpec) Unset

func (v *NullableInstanceSpec) Unset()

type NullableInstanceStatus

type NullableInstanceStatus struct {
	// contains filtered or unexported fields
}

func NewNullableInstanceStatus

func NewNullableInstanceStatus(val *InstanceStatus) *NullableInstanceStatus

func (NullableInstanceStatus) Get

func (NullableInstanceStatus) IsSet

func (v NullableInstanceStatus) IsSet() bool

func (NullableInstanceStatus) MarshalJSON

func (v NullableInstanceStatus) MarshalJSON() ([]byte, error)

func (*NullableInstanceStatus) Set

func (*NullableInstanceStatus) UnmarshalJSON

func (v *NullableInstanceStatus) UnmarshalJSON(src []byte) error

func (*NullableInstanceStatus) Unset

func (v *NullableInstanceStatus) Unset()

type NullableInt

type NullableInt struct {
	// contains filtered or unexported fields
}

func NewNullableInt

func NewNullableInt(val *int) *NullableInt

func (NullableInt) Get

func (v NullableInt) Get() *int

func (NullableInt) IsSet

func (v NullableInt) IsSet() bool

func (NullableInt) MarshalJSON

func (v NullableInt) MarshalJSON() ([]byte, error)

func (*NullableInt) Set

func (v *NullableInt) Set(val *int)

func (*NullableInt) UnmarshalJSON

func (v *NullableInt) UnmarshalJSON(src []byte) error

func (*NullableInt) Unset

func (v *NullableInt) Unset()

type NullableInt32

type NullableInt32 struct {
	// contains filtered or unexported fields
}

func NewNullableInt32

func NewNullableInt32(val *int32) *NullableInt32

func (NullableInt32) Get

func (v NullableInt32) Get() *int32

func (NullableInt32) IsSet

func (v NullableInt32) IsSet() bool

func (NullableInt32) MarshalJSON

func (v NullableInt32) MarshalJSON() ([]byte, error)

func (*NullableInt32) Set

func (v *NullableInt32) Set(val *int32)

func (*NullableInt32) UnmarshalJSON

func (v *NullableInt32) UnmarshalJSON(src []byte) error

func (*NullableInt32) Unset

func (v *NullableInt32) Unset()

type NullableInt64

type NullableInt64 struct {
	// contains filtered or unexported fields
}

func NewNullableInt64

func NewNullableInt64(val *int64) *NullableInt64

func (NullableInt64) Get

func (v NullableInt64) Get() *int64

func (NullableInt64) IsSet

func (v NullableInt64) IsSet() bool

func (NullableInt64) MarshalJSON

func (v NullableInt64) MarshalJSON() ([]byte, error)

func (*NullableInt64) Set

func (v *NullableInt64) Set(val *int64)

func (*NullableInt64) UnmarshalJSON

func (v *NullableInt64) UnmarshalJSON(src []byte) error

func (*NullableInt64) Unset

func (v *NullableInt64) Unset()

type NullableProviderSpec

type NullableProviderSpec struct {
	// contains filtered or unexported fields
}

func NewNullableProviderSpec

func NewNullableProviderSpec(val *ProviderSpec) *NullableProviderSpec

func (NullableProviderSpec) Get

func (NullableProviderSpec) IsSet

func (v NullableProviderSpec) IsSet() bool

func (NullableProviderSpec) MarshalJSON

func (v NullableProviderSpec) MarshalJSON() ([]byte, error)

func (*NullableProviderSpec) Set

func (v *NullableProviderSpec) Set(val *ProviderSpec)

func (*NullableProviderSpec) UnmarshalJSON

func (v *NullableProviderSpec) UnmarshalJSON(src []byte) error

func (*NullableProviderSpec) Unset

func (v *NullableProviderSpec) Unset()

type NullableScrapeTarget

type NullableScrapeTarget struct {
	// contains filtered or unexported fields
}

func NewNullableScrapeTarget

func NewNullableScrapeTarget(val *ScrapeTarget) *NullableScrapeTarget

func (NullableScrapeTarget) Get

func (NullableScrapeTarget) IsSet

func (v NullableScrapeTarget) IsSet() bool

func (NullableScrapeTarget) MarshalJSON

func (v NullableScrapeTarget) MarshalJSON() ([]byte, error)

func (*NullableScrapeTarget) Set

func (v *NullableScrapeTarget) Set(val *ScrapeTarget)

func (*NullableScrapeTarget) UnmarshalJSON

func (v *NullableScrapeTarget) UnmarshalJSON(src []byte) error

func (*NullableScrapeTarget) Unset

func (v *NullableScrapeTarget) Unset()

type NullableStaticSpec

type NullableStaticSpec struct {
	// contains filtered or unexported fields
}

func NewNullableStaticSpec

func NewNullableStaticSpec(val *StaticSpec) *NullableStaticSpec

func (NullableStaticSpec) Get

func (v NullableStaticSpec) Get() *StaticSpec

func (NullableStaticSpec) IsSet

func (v NullableStaticSpec) IsSet() bool

func (NullableStaticSpec) MarshalJSON

func (v NullableStaticSpec) MarshalJSON() ([]byte, error)

func (*NullableStaticSpec) Set

func (v *NullableStaticSpec) Set(val *StaticSpec)

func (*NullableStaticSpec) UnmarshalJSON

func (v *NullableStaticSpec) UnmarshalJSON(src []byte) error

func (*NullableStaticSpec) Unset

func (v *NullableStaticSpec) Unset()

type NullableString

type NullableString struct {
	// contains filtered or unexported fields
}

func NewNullableString

func NewNullableString(val *string) *NullableString

func (NullableString) Get

func (v NullableString) Get() *string

func (NullableString) IsSet

func (v NullableString) IsSet() bool

func (NullableString) MarshalJSON

func (v NullableString) MarshalJSON() ([]byte, error)

func (*NullableString) Set

func (v *NullableString) Set(val *string)

func (*NullableString) UnmarshalJSON

func (v *NullableString) UnmarshalJSON(src []byte) error

func (*NullableString) Unset

func (v *NullableString) Unset()

type NullableTime

type NullableTime struct {
	// contains filtered or unexported fields
}

func NewNullableTime

func NewNullableTime(val *time.Time) *NullableTime

func (NullableTime) Get

func (v NullableTime) Get() *time.Time

func (NullableTime) IsSet

func (v NullableTime) IsSet() bool

func (NullableTime) MarshalJSON

func (v NullableTime) MarshalJSON() ([]byte, error)

func (*NullableTime) Set

func (v *NullableTime) Set(val *time.Time)

func (*NullableTime) UnmarshalJSON

func (v *NullableTime) UnmarshalJSON(src []byte) error

func (*NullableTime) Unset

func (v *NullableTime) Unset()

type ProviderSpec

type ProviderSpec struct {
	Weights map[string]float32 `json:"weights"`
}

ProviderSpec struct for ProviderSpec

func NewProviderSpec

func NewProviderSpec(weights map[string]float32) *ProviderSpec

NewProviderSpec instantiates a new ProviderSpec 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 NewProviderSpecWithDefaults

func NewProviderSpecWithDefaults() *ProviderSpec

NewProviderSpecWithDefaults instantiates a new ProviderSpec 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 (*ProviderSpec) GetWeights

func (o *ProviderSpec) GetWeights() map[string]float32

GetWeights returns the Weights field value

func (*ProviderSpec) GetWeightsOk

func (o *ProviderSpec) GetWeightsOk() (*map[string]float32, bool)

GetWeightsOk returns a tuple with the Weights field value and a boolean to check if the value has been set.

func (ProviderSpec) MarshalJSON

func (o ProviderSpec) MarshalJSON() ([]byte, error)

func (*ProviderSpec) SetWeights

func (o *ProviderSpec) SetWeights(v map[string]float32)

SetWeights sets field value

type ScrapeTarget

type ScrapeTarget struct {
	Name         string       `json:"name"`
	Path         string       `json:"path"`
	Description  string       `json:"description"`
	Query        string       `json:"query"`
	ProviderSpec ProviderSpec `json:"providerSpec"`
	InstanceSpec InstanceSpec `json:"instanceSpec"`
	StaticSpec   StaticSpec   `json:"staticSpec"`
}

ScrapeTarget struct for ScrapeTarget

func NewScrapeTarget

func NewScrapeTarget(name string, path string, description string, query string, providerSpec ProviderSpec, instanceSpec InstanceSpec, staticSpec StaticSpec) *ScrapeTarget

NewScrapeTarget instantiates a new ScrapeTarget 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 NewScrapeTargetWithDefaults

func NewScrapeTargetWithDefaults() *ScrapeTarget

NewScrapeTargetWithDefaults instantiates a new ScrapeTarget 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 (*ScrapeTarget) GetDescription

func (o *ScrapeTarget) GetDescription() string

GetDescription returns the Description field value

func (*ScrapeTarget) GetDescriptionOk

func (o *ScrapeTarget) GetDescriptionOk() (*string, bool)

GetDescriptionOk returns a tuple with the Description field value and a boolean to check if the value has been set.

func (*ScrapeTarget) GetInstanceSpec

func (o *ScrapeTarget) GetInstanceSpec() InstanceSpec

GetInstanceSpec returns the InstanceSpec field value

func (*ScrapeTarget) GetInstanceSpecOk

func (o *ScrapeTarget) GetInstanceSpecOk() (*InstanceSpec, bool)

GetInstanceSpecOk returns a tuple with the InstanceSpec field value and a boolean to check if the value has been set.

func (*ScrapeTarget) GetName

func (o *ScrapeTarget) GetName() string

GetName returns the Name field value

func (*ScrapeTarget) GetNameOk

func (o *ScrapeTarget) GetNameOk() (*string, bool)

GetNameOk returns a tuple with the Name field value and a boolean to check if the value has been set.

func (*ScrapeTarget) GetPath

func (o *ScrapeTarget) GetPath() string

GetPath returns the Path field value

func (*ScrapeTarget) GetPathOk

func (o *ScrapeTarget) GetPathOk() (*string, bool)

GetPathOk returns a tuple with the Path field value and a boolean to check if the value has been set.

func (*ScrapeTarget) GetProviderSpec

func (o *ScrapeTarget) GetProviderSpec() ProviderSpec

GetProviderSpec returns the ProviderSpec field value

func (*ScrapeTarget) GetProviderSpecOk

func (o *ScrapeTarget) GetProviderSpecOk() (*ProviderSpec, bool)

GetProviderSpecOk returns a tuple with the ProviderSpec field value and a boolean to check if the value has been set.

func (*ScrapeTarget) GetQuery

func (o *ScrapeTarget) GetQuery() string

GetQuery returns the Query field value

func (*ScrapeTarget) GetQueryOk

func (o *ScrapeTarget) GetQueryOk() (*string, bool)

GetQueryOk returns a tuple with the Query field value and a boolean to check if the value has been set.

func (*ScrapeTarget) GetStaticSpec

func (o *ScrapeTarget) GetStaticSpec() StaticSpec

GetStaticSpec returns the StaticSpec field value

func (*ScrapeTarget) GetStaticSpecOk

func (o *ScrapeTarget) GetStaticSpecOk() (*StaticSpec, bool)

GetStaticSpecOk returns a tuple with the StaticSpec field value and a boolean to check if the value has been set.

func (ScrapeTarget) MarshalJSON

func (o ScrapeTarget) MarshalJSON() ([]byte, error)

func (*ScrapeTarget) SetDescription

func (o *ScrapeTarget) SetDescription(v string)

SetDescription sets field value

func (*ScrapeTarget) SetInstanceSpec

func (o *ScrapeTarget) SetInstanceSpec(v InstanceSpec)

SetInstanceSpec sets field value

func (*ScrapeTarget) SetName

func (o *ScrapeTarget) SetName(v string)

SetName sets field value

func (*ScrapeTarget) SetPath

func (o *ScrapeTarget) SetPath(v string)

SetPath sets field value

func (*ScrapeTarget) SetProviderSpec

func (o *ScrapeTarget) SetProviderSpec(v ProviderSpec)

SetProviderSpec sets field value

func (*ScrapeTarget) SetQuery

func (o *ScrapeTarget) SetQuery(v string)

SetQuery sets field value

func (*ScrapeTarget) SetStaticSpec

func (o *ScrapeTarget) SetStaticSpec(v StaticSpec)

SetStaticSpec sets field value

type ServerConfiguration

type ServerConfiguration struct {
	URL         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerConfigurations

type ServerConfigurations []ServerConfiguration

ServerConfigurations stores multiple ServerConfiguration items

func (ServerConfigurations) URL

func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error)

URL formats template on a index using given variables

type ServerVariable

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

type StaticSpec

type StaticSpec struct {
	Endpoints []string `json:"endpoints"`
}

StaticSpec struct for StaticSpec

func NewStaticSpec

func NewStaticSpec(endpoints []string) *StaticSpec

NewStaticSpec instantiates a new StaticSpec 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 NewStaticSpecWithDefaults

func NewStaticSpecWithDefaults() *StaticSpec

NewStaticSpecWithDefaults instantiates a new StaticSpec 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 (*StaticSpec) GetEndpoints

func (o *StaticSpec) GetEndpoints() []string

GetEndpoints returns the Endpoints field value

func (*StaticSpec) GetEndpointsOk

func (o *StaticSpec) GetEndpointsOk() (*[]string, bool)

GetEndpointsOk returns a tuple with the Endpoints field value and a boolean to check if the value has been set.

func (StaticSpec) MarshalJSON

func (o StaticSpec) MarshalJSON() ([]byte, error)

func (*StaticSpec) SetEndpoints

func (o *StaticSpec) SetEndpoints(v []string)

SetEndpoints sets field value

type TargetsApiService

type TargetsApiService service

TargetsApiService TargetsApi service

func (*TargetsApiService) ListScrapeTargets

* ListScrapeTargets List ScrapeTargets * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiListScrapeTargetsRequest

func (*TargetsApiService) ListScrapeTargetsExecute

func (a *TargetsApiService) ListScrapeTargetsExecute(r ApiListScrapeTargetsRequest) ([]ScrapeTarget, *_nethttp.Response, error)

* Execute executes the request * @return []ScrapeTarget

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL