mdcb

package module
v0.0.0-...-f1f73c0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MPL-2.0 Imports: 20 Imported by: 0

README

Go API client for mdcb

This API provides operations for monitoring Data Planes connected to MDCB and accessing diagnostic data. It includes endpoints for retrieving connected data plane details, performing health checks, and accessing Go's built-in pprof diagnostics for advanced performance profiling.

Overview

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

  • API version: 1.0.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/net/context

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

import mdcb "github.com/TykTechnologies/go-mdcb"

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 mdcb.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), mdcb.ContextServerIndex, 1)
Templated Server URL

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

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

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

URLs Configuration per Operation

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

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

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
DefaultAPI DataplanesGet Get /dataplanes Retrieve information of all the connected data plane nodes.
DefaultAPI DebugPprofProfileGet Get /debug/pprof/profile CPU Profiling data
DefaultAPI DebugPprofProfileTypeGet Get /debug/pprof/{profileType} pprof data
DefaultAPI HealthGet Get /health Health Check

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 (
	JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`)
	XmlCheck  = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`)
)
View Source
var (
	// 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 IsNil

func IsNil(i interface{}) bool

IsNil checks if an input is nil

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 {
	DefaultAPI DefaultAPI
	// contains filtered or unexported fields
}

APIClient manages communication with the MDCB Data Planes and Diagnostics API API v1.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 APIResponse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

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

type ApiDataplanesGetRequest

type ApiDataplanesGetRequest struct {
	ApiService DefaultAPI
	// contains filtered or unexported fields
}

func (ApiDataplanesGetRequest) Execute

func (r ApiDataplanesGetRequest) Execute() (*map[string][]Node, *http.Response, error)

func (ApiDataplanesGetRequest) XTykAuthorization

func (r ApiDataplanesGetRequest) XTykAuthorization(xTykAuthorization string) ApiDataplanesGetRequest

Secret value set in sink.conf

type ApiDebugPprofProfileGetRequest

type ApiDebugPprofProfileGetRequest struct {
	ApiService DefaultAPI
	// contains filtered or unexported fields
}

func (ApiDebugPprofProfileGetRequest) Execute

type ApiDebugPprofProfileTypeGetRequest

type ApiDebugPprofProfileTypeGetRequest struct {
	ApiService DefaultAPI
	// contains filtered or unexported fields
}

func (ApiDebugPprofProfileTypeGetRequest) Execute

type ApiHealthGetRequest

type ApiHealthGetRequest struct {
	ApiService DefaultAPI
	// contains filtered or unexported fields
}

func (ApiHealthGetRequest) Execute

func (r ApiHealthGetRequest) Execute() (string, *http.Response, error)

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 ComponentStatus

type ComponentStatus struct {
	Status        *string    `json:"status,omitempty"`
	ComponentType *string    `json:"componentType,omitempty"`
	Time          *time.Time `json:"time,omitempty"`
}

ComponentStatus struct for ComponentStatus

func NewComponentStatus

func NewComponentStatus() *ComponentStatus

NewComponentStatus instantiates a new ComponentStatus 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 NewComponentStatusWithDefaults

func NewComponentStatusWithDefaults() *ComponentStatus

NewComponentStatusWithDefaults instantiates a new ComponentStatus 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 (*ComponentStatus) GetComponentType

func (o *ComponentStatus) GetComponentType() string

GetComponentType returns the ComponentType field value if set, zero value otherwise.

func (*ComponentStatus) GetComponentTypeOk

func (o *ComponentStatus) GetComponentTypeOk() (*string, bool)

GetComponentTypeOk returns a tuple with the ComponentType field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ComponentStatus) GetStatus

func (o *ComponentStatus) GetStatus() string

GetStatus returns the Status field value if set, zero value otherwise.

func (*ComponentStatus) GetStatusOk

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

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 (*ComponentStatus) GetTime

func (o *ComponentStatus) GetTime() time.Time

GetTime returns the Time field value if set, zero value otherwise.

func (*ComponentStatus) GetTimeOk

func (o *ComponentStatus) GetTimeOk() (*time.Time, bool)

GetTimeOk returns a tuple with the Time field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ComponentStatus) HasComponentType

func (o *ComponentStatus) HasComponentType() bool

HasComponentType returns a boolean if a field has been set.

func (*ComponentStatus) HasStatus

func (o *ComponentStatus) HasStatus() bool

HasStatus returns a boolean if a field has been set.

func (*ComponentStatus) HasTime

func (o *ComponentStatus) HasTime() bool

HasTime returns a boolean if a field has been set.

func (ComponentStatus) MarshalJSON

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

func (*ComponentStatus) SetComponentType

func (o *ComponentStatus) SetComponentType(v string)

SetComponentType gets a reference to the given string and assigns it to the ComponentType field.

func (*ComponentStatus) SetStatus

func (o *ComponentStatus) SetStatus(v string)

SetStatus gets a reference to the given string and assigns it to the Status field.

func (*ComponentStatus) SetTime

func (o *ComponentStatus) SetTime(v time.Time)

SetTime gets a reference to the given time.Time and assigns it to the Time field.

func (ComponentStatus) ToMap

func (o ComponentStatus) ToMap() (map[string]interface{}, error)

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 DefaultAPI

type DefaultAPI interface {

	/*
		DataplanesGet Retrieve information of all the connected data plane nodes.

		Provides a list of all the data plane nodes connected to MDCB. Data plane nodes are Tyk Gateways that make your APIs available to your consumers. MDCB offers centralised management of your data plane nodes. This endpoint offers metadata and status for all connected data plane nodes, allowing for monitoring and troubleshooting.

		@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
		@return ApiDataplanesGetRequest
	*/
	DataplanesGet(ctx context.Context) ApiDataplanesGetRequest

	// DataplanesGetExecute executes the request
	//  @return map[string][]Node
	DataplanesGetExecute(r ApiDataplanesGetRequest) (*map[string][]Node, *http.Response, error)

	/*
		DebugPprofProfileGet CPU Profiling data

		Returns CPU profiling data. Available only when HTTPProfile is enabled in sink.conf.

		@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
		@return ApiDebugPprofProfileGetRequest
	*/
	DebugPprofProfileGet(ctx context.Context) ApiDebugPprofProfileGetRequest

	// DebugPprofProfileGetExecute executes the request
	//  @return *os.File
	DebugPprofProfileGetExecute(r ApiDebugPprofProfileGetRequest) (*os.File, *http.Response, error)

	/*
		DebugPprofProfileTypeGet pprof data

		Serves various pprof data like heap, goroutine, threadcreate, block, and so on. The `{profileType}` path parameter can accept various profiling types as well as more complex patterns. Available only when HTTPProfile is enabled in sink.conf.


		@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
		@param profileType The specific pprof data to retrieve (heap, goroutine, threadcreate, block, etc.), or a pattern matching multiple types.
		@return ApiDebugPprofProfileTypeGetRequest
	*/
	DebugPprofProfileTypeGet(ctx context.Context, profileType string) ApiDebugPprofProfileTypeGetRequest

	// DebugPprofProfileTypeGetExecute executes the request
	//  @return *os.File
	DebugPprofProfileTypeGetExecute(r ApiDebugPprofProfileTypeGetRequest) (*os.File, *http.Response, error)

	/*
		HealthGet Health Check

		Returns OK if the service is up and running.

		@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
		@return ApiHealthGetRequest
	*/
	HealthGet(ctx context.Context) ApiHealthGetRequest

	// HealthGetExecute executes the request
	//  @return string
	HealthGetExecute(r ApiHealthGetRequest) (string, *http.Response, error)
}

type DefaultAPIService

type DefaultAPIService service

DefaultAPIService DefaultAPI service

func (*DefaultAPIService) DataplanesGet

DataplanesGet Retrieve information of all the connected data plane nodes.

Provides a list of all the data plane nodes connected to MDCB. Data plane nodes are Tyk Gateways that make your APIs available to your consumers. MDCB offers centralised management of your data plane nodes. This endpoint offers metadata and status for all connected data plane nodes, allowing for monitoring and troubleshooting.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiDataplanesGetRequest

func (*DefaultAPIService) DataplanesGetExecute

func (a *DefaultAPIService) DataplanesGetExecute(r ApiDataplanesGetRequest) (*map[string][]Node, *http.Response, error)

Execute executes the request

@return map[string][]Node

func (*DefaultAPIService) DebugPprofProfileGet

func (a *DefaultAPIService) DebugPprofProfileGet(ctx context.Context) ApiDebugPprofProfileGetRequest

DebugPprofProfileGet CPU Profiling data

Returns CPU profiling data. Available only when HTTPProfile is enabled in sink.conf.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiDebugPprofProfileGetRequest

func (*DefaultAPIService) DebugPprofProfileGetExecute

func (a *DefaultAPIService) DebugPprofProfileGetExecute(r ApiDebugPprofProfileGetRequest) (*os.File, *http.Response, error)

Execute executes the request

@return *os.File

func (*DefaultAPIService) DebugPprofProfileTypeGet

func (a *DefaultAPIService) DebugPprofProfileTypeGet(ctx context.Context, profileType string) ApiDebugPprofProfileTypeGetRequest

DebugPprofProfileTypeGet pprof data

Serves various pprof data like heap, goroutine, threadcreate, block, and so on. The `{profileType}` path parameter can accept various profiling types as well as more complex patterns. Available only when HTTPProfile is enabled in sink.conf.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param profileType The specific pprof data to retrieve (heap, goroutine, threadcreate, block, etc.), or a pattern matching multiple types.
@return ApiDebugPprofProfileTypeGetRequest

func (*DefaultAPIService) DebugPprofProfileTypeGetExecute

func (a *DefaultAPIService) DebugPprofProfileTypeGetExecute(r ApiDebugPprofProfileTypeGetRequest) (*os.File, *http.Response, error)

Execute executes the request

@return *os.File

func (*DefaultAPIService) HealthGet

HealthGet Health Check

Returns OK if the service is up and running.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiHealthGetRequest

func (*DefaultAPIService) HealthGetExecute

func (a *DefaultAPIService) HealthGetExecute(r ApiHealthGetRequest) (string, *http.Response, error)

Execute executes the request

@return string

type Error

type Error struct {
	Error *string `json:"error,omitempty"`
}

Error struct for Error

func NewError

func NewError() *Error

NewError instantiates a new Error 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 NewErrorWithDefaults

func NewErrorWithDefaults() *Error

NewErrorWithDefaults instantiates a new Error 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 (*Error) GetError

func (o *Error) GetError() string

GetError returns the Error field value if set, zero value otherwise.

func (*Error) GetErrorOk

func (o *Error) GetErrorOk() (*string, bool)

GetErrorOk returns a tuple with the Error field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Error) HasError

func (o *Error) HasError() bool

HasError returns a boolean if a field has been set.

func (Error) MarshalJSON

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

func (*Error) SetError

func (o *Error) SetError(v string)

SetError gets a reference to the given string and assigns it to the Error field.

func (Error) ToMap

func (o Error) ToMap() (map[string]interface{}, error)

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 Health

type Health struct {
	Redis *ComponentStatus `json:"redis,omitempty"`
	Rpc   *ComponentStatus `json:"rpc,omitempty"`
}

Health struct for Health

func NewHealth

func NewHealth() *Health

NewHealth instantiates a new Health 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 NewHealthWithDefaults

func NewHealthWithDefaults() *Health

NewHealthWithDefaults instantiates a new Health 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 (*Health) GetRedis

func (o *Health) GetRedis() ComponentStatus

GetRedis returns the Redis field value if set, zero value otherwise.

func (*Health) GetRedisOk

func (o *Health) GetRedisOk() (*ComponentStatus, bool)

GetRedisOk returns a tuple with the Redis field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Health) GetRpc

func (o *Health) GetRpc() ComponentStatus

GetRpc returns the Rpc field value if set, zero value otherwise.

func (*Health) GetRpcOk

func (o *Health) GetRpcOk() (*ComponentStatus, bool)

GetRpcOk returns a tuple with the Rpc field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Health) HasRedis

func (o *Health) HasRedis() bool

HasRedis returns a boolean if a field has been set.

func (*Health) HasRpc

func (o *Health) HasRpc() bool

HasRpc returns a boolean if a field has been set.

func (Health) MarshalJSON

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

func (*Health) SetRedis

func (o *Health) SetRedis(v ComponentStatus)

SetRedis gets a reference to the given ComponentStatus and assigns it to the Redis field.

func (*Health) SetRpc

func (o *Health) SetRpc(v ComponentStatus)

SetRpc gets a reference to the given ComponentStatus and assigns it to the Rpc field.

func (Health) ToMap

func (o Health) ToMap() (map[string]interface{}, error)

type MappedNullable

type MappedNullable interface {
	ToMap() (map[string]interface{}, error)
}

type Node

type Node struct {
	NodeId      *string  `json:"node_id,omitempty"`
	ApiKey      *string  `json:"api_key,omitempty"`
	GroupId     *string  `json:"group_id,omitempty"`
	NodeVersion *string  `json:"node_version,omitempty"`
	Ttl         *int32   `json:"ttl,omitempty"`
	Tags        []string `json:"tags,omitempty"`
	Health      *Health  `json:"health,omitempty"`
	Stats       *Stats   `json:"stats,omitempty"`
}

Node struct for Node

func NewNode

func NewNode() *Node

NewNode instantiates a new Node 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 NewNodeWithDefaults

func NewNodeWithDefaults() *Node

NewNodeWithDefaults instantiates a new Node 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 (*Node) GetApiKey

func (o *Node) GetApiKey() string

GetApiKey returns the ApiKey field value if set, zero value otherwise.

func (*Node) GetApiKeyOk

func (o *Node) GetApiKeyOk() (*string, bool)

GetApiKeyOk returns a tuple with the ApiKey field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Node) GetGroupId

func (o *Node) GetGroupId() string

GetGroupId returns the GroupId field value if set, zero value otherwise.

func (*Node) GetGroupIdOk

func (o *Node) GetGroupIdOk() (*string, bool)

GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Node) GetHealth

func (o *Node) GetHealth() Health

GetHealth returns the Health field value if set, zero value otherwise.

func (*Node) GetHealthOk

func (o *Node) GetHealthOk() (*Health, bool)

GetHealthOk returns a tuple with the Health field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Node) GetNodeId

func (o *Node) GetNodeId() string

GetNodeId returns the NodeId field value if set, zero value otherwise.

func (*Node) GetNodeIdOk

func (o *Node) GetNodeIdOk() (*string, bool)

GetNodeIdOk returns a tuple with the NodeId field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Node) GetNodeVersion

func (o *Node) GetNodeVersion() string

GetNodeVersion returns the NodeVersion field value if set, zero value otherwise.

func (*Node) GetNodeVersionOk

func (o *Node) GetNodeVersionOk() (*string, bool)

GetNodeVersionOk returns a tuple with the NodeVersion field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Node) GetStats

func (o *Node) GetStats() Stats

GetStats returns the Stats field value if set, zero value otherwise.

func (*Node) GetStatsOk

func (o *Node) GetStatsOk() (*Stats, bool)

GetStatsOk returns a tuple with the Stats field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Node) GetTags

func (o *Node) GetTags() []string

GetTags returns the Tags field value if set, zero value otherwise.

func (*Node) GetTagsOk

func (o *Node) GetTagsOk() ([]string, bool)

GetTagsOk returns a tuple with the Tags field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Node) GetTtl

func (o *Node) GetTtl() int32

GetTtl returns the Ttl field value if set, zero value otherwise.

func (*Node) GetTtlOk

func (o *Node) GetTtlOk() (*int32, bool)

GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Node) HasApiKey

func (o *Node) HasApiKey() bool

HasApiKey returns a boolean if a field has been set.

func (*Node) HasGroupId

func (o *Node) HasGroupId() bool

HasGroupId returns a boolean if a field has been set.

func (*Node) HasHealth

func (o *Node) HasHealth() bool

HasHealth returns a boolean if a field has been set.

func (*Node) HasNodeId

func (o *Node) HasNodeId() bool

HasNodeId returns a boolean if a field has been set.

func (*Node) HasNodeVersion

func (o *Node) HasNodeVersion() bool

HasNodeVersion returns a boolean if a field has been set.

func (*Node) HasStats

func (o *Node) HasStats() bool

HasStats returns a boolean if a field has been set.

func (*Node) HasTags

func (o *Node) HasTags() bool

HasTags returns a boolean if a field has been set.

func (*Node) HasTtl

func (o *Node) HasTtl() bool

HasTtl returns a boolean if a field has been set.

func (Node) MarshalJSON

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

func (*Node) SetApiKey

func (o *Node) SetApiKey(v string)

SetApiKey gets a reference to the given string and assigns it to the ApiKey field.

func (*Node) SetGroupId

func (o *Node) SetGroupId(v string)

SetGroupId gets a reference to the given string and assigns it to the GroupId field.

func (*Node) SetHealth

func (o *Node) SetHealth(v Health)

SetHealth gets a reference to the given Health and assigns it to the Health field.

func (*Node) SetNodeId

func (o *Node) SetNodeId(v string)

SetNodeId gets a reference to the given string and assigns it to the NodeId field.

func (*Node) SetNodeVersion

func (o *Node) SetNodeVersion(v string)

SetNodeVersion gets a reference to the given string and assigns it to the NodeVersion field.

func (*Node) SetStats

func (o *Node) SetStats(v Stats)

SetStats gets a reference to the given Stats and assigns it to the Stats field.

func (*Node) SetTags

func (o *Node) SetTags(v []string)

SetTags gets a reference to the given []string and assigns it to the Tags field.

func (*Node) SetTtl

func (o *Node) SetTtl(v int32)

SetTtl gets a reference to the given int32 and assigns it to the Ttl field.

func (Node) ToMap

func (o Node) ToMap() (map[string]interface{}, error)

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 NullableComponentStatus

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

func NewNullableComponentStatus

func NewNullableComponentStatus(val *ComponentStatus) *NullableComponentStatus

func (NullableComponentStatus) Get

func (NullableComponentStatus) IsSet

func (v NullableComponentStatus) IsSet() bool

func (NullableComponentStatus) MarshalJSON

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

func (*NullableComponentStatus) Set

func (*NullableComponentStatus) UnmarshalJSON

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

func (*NullableComponentStatus) Unset

func (v *NullableComponentStatus) Unset()

type NullableError

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

func NewNullableError

func NewNullableError(val *Error) *NullableError

func (NullableError) Get

func (v NullableError) Get() *Error

func (NullableError) IsSet

func (v NullableError) IsSet() bool

func (NullableError) MarshalJSON

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

func (*NullableError) Set

func (v *NullableError) Set(val *Error)

func (*NullableError) UnmarshalJSON

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

func (*NullableError) Unset

func (v *NullableError) 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 NullableHealth

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

func NewNullableHealth

func NewNullableHealth(val *Health) *NullableHealth

func (NullableHealth) Get

func (v NullableHealth) Get() *Health

func (NullableHealth) IsSet

func (v NullableHealth) IsSet() bool

func (NullableHealth) MarshalJSON

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

func (*NullableHealth) Set

func (v *NullableHealth) Set(val *Health)

func (*NullableHealth) UnmarshalJSON

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

func (*NullableHealth) Unset

func (v *NullableHealth) 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 NullableNode

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

func NewNullableNode

func NewNullableNode(val *Node) *NullableNode

func (NullableNode) Get

func (v NullableNode) Get() *Node

func (NullableNode) IsSet

func (v NullableNode) IsSet() bool

func (NullableNode) MarshalJSON

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

func (*NullableNode) Set

func (v *NullableNode) Set(val *Node)

func (*NullableNode) UnmarshalJSON

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

func (*NullableNode) Unset

func (v *NullableNode) Unset()

type NullableStats

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

func NewNullableStats

func NewNullableStats(val *Stats) *NullableStats

func (NullableStats) Get

func (v NullableStats) Get() *Stats

func (NullableStats) IsSet

func (v NullableStats) IsSet() bool

func (NullableStats) MarshalJSON

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

func (*NullableStats) Set

func (v *NullableStats) Set(val *Stats)

func (*NullableStats) UnmarshalJSON

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

func (*NullableStats) Unset

func (v *NullableStats) 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 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 Stats

type Stats struct {
	ApisCount     *int32 `json:"apis_count,omitempty"`
	PoliciesCount *int32 `json:"policies_count,omitempty"`
}

Stats struct for Stats

func NewStats

func NewStats() *Stats

NewStats instantiates a new Stats 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 NewStatsWithDefaults

func NewStatsWithDefaults() *Stats

NewStatsWithDefaults instantiates a new Stats 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 (*Stats) GetApisCount

func (o *Stats) GetApisCount() int32

GetApisCount returns the ApisCount field value if set, zero value otherwise.

func (*Stats) GetApisCountOk

func (o *Stats) GetApisCountOk() (*int32, bool)

GetApisCountOk returns a tuple with the ApisCount field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Stats) GetPoliciesCount

func (o *Stats) GetPoliciesCount() int32

GetPoliciesCount returns the PoliciesCount field value if set, zero value otherwise.

func (*Stats) GetPoliciesCountOk

func (o *Stats) GetPoliciesCountOk() (*int32, bool)

GetPoliciesCountOk returns a tuple with the PoliciesCount field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Stats) HasApisCount

func (o *Stats) HasApisCount() bool

HasApisCount returns a boolean if a field has been set.

func (*Stats) HasPoliciesCount

func (o *Stats) HasPoliciesCount() bool

HasPoliciesCount returns a boolean if a field has been set.

func (Stats) MarshalJSON

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

func (*Stats) SetApisCount

func (o *Stats) SetApisCount(v int32)

SetApisCount gets a reference to the given int32 and assigns it to the ApisCount field.

func (*Stats) SetPoliciesCount

func (o *Stats) SetPoliciesCount(v int32)

SetPoliciesCount gets a reference to the given int32 and assigns it to the PoliciesCount field.

func (Stats) ToMap

func (o Stats) ToMap() (map[string]interface{}, error)

Jump to

Keyboard shortcuts

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