gopinto

package module
v0.0.0-...-3ed5526 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 22 Imported by: 1

README

Go API client for gopinto

Additional info

Nexus Info (DNS - CloudProviders)

OPENAPIGATEWAY-USAGE.MD

CHANGELOG.md

version.md

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: v1
  • 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 "./gopinto"

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

Class Method HTTP request Description
RecordsApi ApiDnsRecordsDelete Delete /api/dns/Records Deletes records which match the specified criterias
RecordsApi ApiDnsRecordsGet Get /api/dns/Records Retrieves the DNS zone's resource records
RecordsApi ApiDnsRecordsPost Post /api/dns/Records Creates a new DNS resource record
ZonesApi ApiDnsZonesGet Get /api/dns/Zones Retrieves the DNS zones assigned to the account
ZonesApi ApiDnsZonesPost Post /api/dns/Zones Creates a new DNS zone
ZonesApi ApiDnsZonesZoneDelete Delete /api/dns/Zones/{zone} Deletes a DNS zone from the passed provider
ZonesApi ApiDnsZonesZoneGet Get /api/dns/Zones/{zone} Loads the specified DNS zone

Documentation For Models

Documentation For Authorization

oidc

Example

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

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

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

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

Author

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 {
	RecordsApi RecordsApi

	ZonesApi ZonesApi
	// contains filtered or unexported fields
}

APIClient manages communication with the Pinto - OpenApi Gateway - DNS API vv1 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 ApiApiDnsRecordsDeleteRequest

type ApiApiDnsRecordsDeleteRequest struct {
	ApiService RecordsApi
	// contains filtered or unexported fields
}

func (ApiApiDnsRecordsDeleteRequest) Environment

func (ApiApiDnsRecordsDeleteRequest) Execute

func (ApiApiDnsRecordsDeleteRequest) Name

func (ApiApiDnsRecordsDeleteRequest) Provider

func (ApiApiDnsRecordsDeleteRequest) RecordType

func (ApiApiDnsRecordsDeleteRequest) RequestBody

func (ApiApiDnsRecordsDeleteRequest) Zone

type ApiApiDnsRecordsGetRequest

type ApiApiDnsRecordsGetRequest struct {
	ApiService RecordsApi
	// contains filtered or unexported fields
}

func (ApiApiDnsRecordsGetRequest) Environment

func (ApiApiDnsRecordsGetRequest) Execute

func (ApiApiDnsRecordsGetRequest) Name

func (ApiApiDnsRecordsGetRequest) PageSize

func (ApiApiDnsRecordsGetRequest) PageToken

func (ApiApiDnsRecordsGetRequest) Provider

func (ApiApiDnsRecordsGetRequest) RecordType

func (ApiApiDnsRecordsGetRequest) Zone

type ApiApiDnsRecordsPostRequest

type ApiApiDnsRecordsPostRequest struct {
	ApiService RecordsApi
	// contains filtered or unexported fields
}

func (ApiApiDnsRecordsPostRequest) CreateRecordRequestModel

func (r ApiApiDnsRecordsPostRequest) CreateRecordRequestModel(createRecordRequestModel CreateRecordRequestModel) ApiApiDnsRecordsPostRequest

func (ApiApiDnsRecordsPostRequest) Execute

type ApiApiDnsZonesGetRequest

type ApiApiDnsZonesGetRequest struct {
	ApiService ZonesApi
	// contains filtered or unexported fields
}

func (ApiApiDnsZonesGetRequest) Environment

func (r ApiApiDnsZonesGetRequest) Environment(environment string) ApiApiDnsZonesGetRequest

func (ApiApiDnsZonesGetRequest) Execute

func (ApiApiDnsZonesGetRequest) PageSize

func (ApiApiDnsZonesGetRequest) PageToken

func (ApiApiDnsZonesGetRequest) Provider

type ApiApiDnsZonesPostRequest

type ApiApiDnsZonesPostRequest struct {
	ApiService ZonesApi
	// contains filtered or unexported fields
}

func (ApiApiDnsZonesPostRequest) CreateZoneRequestModel

func (r ApiApiDnsZonesPostRequest) CreateZoneRequestModel(createZoneRequestModel CreateZoneRequestModel) ApiApiDnsZonesPostRequest

func (ApiApiDnsZonesPostRequest) Execute

type ApiApiDnsZonesZoneDeleteRequest

type ApiApiDnsZonesZoneDeleteRequest struct {
	ApiService ZonesApi
	// contains filtered or unexported fields
}

func (ApiApiDnsZonesZoneDeleteRequest) Environment

func (ApiApiDnsZonesZoneDeleteRequest) Execute

func (ApiApiDnsZonesZoneDeleteRequest) Provider

type ApiApiDnsZonesZoneGetRequest

type ApiApiDnsZonesZoneGetRequest struct {
	ApiService ZonesApi
	// contains filtered or unexported fields
}

func (ApiApiDnsZonesZoneGetRequest) Environment

func (ApiApiDnsZonesZoneGetRequest) Execute

func (ApiApiDnsZonesZoneGetRequest) Provider

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 CreateRecordRequestModel

type CreateRecordRequestModel struct {
	Provider    string         `json:"provider"`
	Environment NullableString `json:"environment,omitempty"`
	Zone        string         `json:"zone"`
	Name        string         `json:"name"`
	Class       *RecordClass   `json:"class,omitempty"`
	Type        RecordType     `json:"type"`
	Data        string         `json:"data"`
	Ttl         *int32         `json:"ttl,omitempty"`
}

CreateRecordRequestModel struct for CreateRecordRequestModel

func NewCreateRecordRequestModel

func NewCreateRecordRequestModel(provider string, zone string, name string, type_ RecordType, data string) *CreateRecordRequestModel

NewCreateRecordRequestModel instantiates a new CreateRecordRequestModel 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 NewCreateRecordRequestModelWithDefaults

func NewCreateRecordRequestModelWithDefaults() *CreateRecordRequestModel

NewCreateRecordRequestModelWithDefaults instantiates a new CreateRecordRequestModel 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 (*CreateRecordRequestModel) GetClass

func (o *CreateRecordRequestModel) GetClass() RecordClass

GetClass returns the Class field value if set, zero value otherwise.

func (*CreateRecordRequestModel) GetClassOk

func (o *CreateRecordRequestModel) GetClassOk() (*RecordClass, bool)

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

func (*CreateRecordRequestModel) GetData

func (o *CreateRecordRequestModel) GetData() string

GetData returns the Data field value

func (*CreateRecordRequestModel) GetDataOk

func (o *CreateRecordRequestModel) GetDataOk() (*string, bool)

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

func (*CreateRecordRequestModel) GetEnvironment

func (o *CreateRecordRequestModel) GetEnvironment() string

GetEnvironment returns the Environment field value if set, zero value otherwise (both if not set or set to explicit null).

func (*CreateRecordRequestModel) GetEnvironmentOk

func (o *CreateRecordRequestModel) GetEnvironmentOk() (*string, bool)

GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*CreateRecordRequestModel) GetName

func (o *CreateRecordRequestModel) GetName() string

GetName returns the Name field value

func (*CreateRecordRequestModel) GetNameOk

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

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

func (*CreateRecordRequestModel) GetProvider

func (o *CreateRecordRequestModel) GetProvider() string

GetProvider returns the Provider field value

func (*CreateRecordRequestModel) GetProviderOk

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

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

func (*CreateRecordRequestModel) GetTtl

func (o *CreateRecordRequestModel) GetTtl() int32

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

func (*CreateRecordRequestModel) GetTtlOk

func (o *CreateRecordRequestModel) 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 (*CreateRecordRequestModel) GetType

func (o *CreateRecordRequestModel) GetType() RecordType

GetType returns the Type field value

func (*CreateRecordRequestModel) GetTypeOk

func (o *CreateRecordRequestModel) GetTypeOk() (*RecordType, bool)

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

func (*CreateRecordRequestModel) GetZone

func (o *CreateRecordRequestModel) GetZone() string

GetZone returns the Zone field value

func (*CreateRecordRequestModel) GetZoneOk

func (o *CreateRecordRequestModel) GetZoneOk() (*string, bool)

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

func (*CreateRecordRequestModel) HasClass

func (o *CreateRecordRequestModel) HasClass() bool

HasClass returns a boolean if a field has been set.

func (*CreateRecordRequestModel) HasEnvironment

func (o *CreateRecordRequestModel) HasEnvironment() bool

HasEnvironment returns a boolean if a field has been set.

func (*CreateRecordRequestModel) HasTtl

func (o *CreateRecordRequestModel) HasTtl() bool

HasTtl returns a boolean if a field has been set.

func (CreateRecordRequestModel) MarshalJSON

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

func (*CreateRecordRequestModel) SetClass

func (o *CreateRecordRequestModel) SetClass(v RecordClass)

SetClass gets a reference to the given RecordClass and assigns it to the Class field.

func (*CreateRecordRequestModel) SetData

func (o *CreateRecordRequestModel) SetData(v string)

SetData sets field value

func (*CreateRecordRequestModel) SetEnvironment

func (o *CreateRecordRequestModel) SetEnvironment(v string)

SetEnvironment gets a reference to the given NullableString and assigns it to the Environment field.

func (*CreateRecordRequestModel) SetEnvironmentNil

func (o *CreateRecordRequestModel) SetEnvironmentNil()

SetEnvironmentNil sets the value for Environment to be an explicit nil

func (*CreateRecordRequestModel) SetName

func (o *CreateRecordRequestModel) SetName(v string)

SetName sets field value

func (*CreateRecordRequestModel) SetProvider

func (o *CreateRecordRequestModel) SetProvider(v string)

SetProvider sets field value

func (*CreateRecordRequestModel) SetTtl

func (o *CreateRecordRequestModel) SetTtl(v int32)

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

func (*CreateRecordRequestModel) SetType

func (o *CreateRecordRequestModel) SetType(v RecordType)

SetType sets field value

func (*CreateRecordRequestModel) SetZone

func (o *CreateRecordRequestModel) SetZone(v string)

SetZone sets field value

func (*CreateRecordRequestModel) UnsetEnvironment

func (o *CreateRecordRequestModel) UnsetEnvironment()

UnsetEnvironment ensures that no value is present for Environment, not even an explicit nil

type CreateZoneRequestModel

type CreateZoneRequestModel struct {
	Provider    string         `json:"provider"`
	Environment NullableString `json:"environment,omitempty"`
	Name        string         `json:"name"`
}

CreateZoneRequestModel struct for CreateZoneRequestModel

func NewCreateZoneRequestModel

func NewCreateZoneRequestModel(provider string, name string) *CreateZoneRequestModel

NewCreateZoneRequestModel instantiates a new CreateZoneRequestModel 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 NewCreateZoneRequestModelWithDefaults

func NewCreateZoneRequestModelWithDefaults() *CreateZoneRequestModel

NewCreateZoneRequestModelWithDefaults instantiates a new CreateZoneRequestModel 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 (*CreateZoneRequestModel) GetEnvironment

func (o *CreateZoneRequestModel) GetEnvironment() string

GetEnvironment returns the Environment field value if set, zero value otherwise (both if not set or set to explicit null).

func (*CreateZoneRequestModel) GetEnvironmentOk

func (o *CreateZoneRequestModel) GetEnvironmentOk() (*string, bool)

GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*CreateZoneRequestModel) GetName

func (o *CreateZoneRequestModel) GetName() string

GetName returns the Name field value

func (*CreateZoneRequestModel) GetNameOk

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

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

func (*CreateZoneRequestModel) GetProvider

func (o *CreateZoneRequestModel) GetProvider() string

GetProvider returns the Provider field value

func (*CreateZoneRequestModel) GetProviderOk

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

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

func (*CreateZoneRequestModel) HasEnvironment

func (o *CreateZoneRequestModel) HasEnvironment() bool

HasEnvironment returns a boolean if a field has been set.

func (CreateZoneRequestModel) MarshalJSON

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

func (*CreateZoneRequestModel) SetEnvironment

func (o *CreateZoneRequestModel) SetEnvironment(v string)

SetEnvironment gets a reference to the given NullableString and assigns it to the Environment field.

func (*CreateZoneRequestModel) SetEnvironmentNil

func (o *CreateZoneRequestModel) SetEnvironmentNil()

SetEnvironmentNil sets the value for Environment to be an explicit nil

func (*CreateZoneRequestModel) SetName

func (o *CreateZoneRequestModel) SetName(v string)

SetName sets field value

func (*CreateZoneRequestModel) SetProvider

func (o *CreateZoneRequestModel) SetProvider(v string)

SetProvider sets field value

func (*CreateZoneRequestModel) UnsetEnvironment

func (o *CreateZoneRequestModel) UnsetEnvironment()

UnsetEnvironment ensures that no value is present for Environment, not even an explicit nil

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 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 NullableCreateRecordRequestModel

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

func (NullableCreateRecordRequestModel) Get

func (NullableCreateRecordRequestModel) IsSet

func (NullableCreateRecordRequestModel) MarshalJSON

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

func (*NullableCreateRecordRequestModel) Set

func (*NullableCreateRecordRequestModel) UnmarshalJSON

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

func (*NullableCreateRecordRequestModel) Unset

type NullableCreateZoneRequestModel

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

func (NullableCreateZoneRequestModel) Get

func (NullableCreateZoneRequestModel) IsSet

func (NullableCreateZoneRequestModel) MarshalJSON

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

func (*NullableCreateZoneRequestModel) Set

func (*NullableCreateZoneRequestModel) UnmarshalJSON

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

func (*NullableCreateZoneRequestModel) Unset

func (v *NullableCreateZoneRequestModel) 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 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 NullableRecord

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

func NewNullableRecord

func NewNullableRecord(val *Record) *NullableRecord

func (NullableRecord) Get

func (v NullableRecord) Get() *Record

func (NullableRecord) IsSet

func (v NullableRecord) IsSet() bool

func (NullableRecord) MarshalJSON

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

func (*NullableRecord) Set

func (v *NullableRecord) Set(val *Record)

func (*NullableRecord) UnmarshalJSON

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

func (*NullableRecord) Unset

func (v *NullableRecord) Unset()

type NullableRecordClass

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

func NewNullableRecordClass

func NewNullableRecordClass(val *RecordClass) *NullableRecordClass

func (NullableRecordClass) Get

func (NullableRecordClass) IsSet

func (v NullableRecordClass) IsSet() bool

func (NullableRecordClass) MarshalJSON

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

func (*NullableRecordClass) Set

func (v *NullableRecordClass) Set(val *RecordClass)

func (*NullableRecordClass) UnmarshalJSON

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

func (*NullableRecordClass) Unset

func (v *NullableRecordClass) Unset()

type NullableRecordType

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

func NewNullableRecordType

func NewNullableRecordType(val *RecordType) *NullableRecordType

func (NullableRecordType) Get

func (v NullableRecordType) Get() *RecordType

func (NullableRecordType) IsSet

func (v NullableRecordType) IsSet() bool

func (NullableRecordType) MarshalJSON

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

func (*NullableRecordType) Set

func (v *NullableRecordType) Set(val *RecordType)

func (*NullableRecordType) UnmarshalJSON

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

func (*NullableRecordType) Unset

func (v *NullableRecordType) 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 NullableZone

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

func NewNullableZone

func NewNullableZone(val *Zone) *NullableZone

func (NullableZone) Get

func (v NullableZone) Get() *Zone

func (NullableZone) IsSet

func (v NullableZone) IsSet() bool

func (NullableZone) MarshalJSON

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

func (*NullableZone) Set

func (v *NullableZone) Set(val *Zone)

func (*NullableZone) UnmarshalJSON

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

func (*NullableZone) Unset

func (v *NullableZone) Unset()

type Record

type Record struct {
	Name  string     `json:"name"`
	Type  RecordType `json:"type"`
	Class string     `json:"class"`
	Ttl   *int32     `json:"ttl,omitempty"`
	Data  string     `json:"data"`
}

Record struct for Record

func NewRecord

func NewRecord(name string, type_ RecordType, class string, data string) *Record

NewRecord instantiates a new Record 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 NewRecordWithDefaults

func NewRecordWithDefaults() *Record

NewRecordWithDefaults instantiates a new Record 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 (*Record) GetClass

func (o *Record) GetClass() string

GetClass returns the Class field value

func (*Record) GetClassOk

func (o *Record) GetClassOk() (*string, bool)

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

func (*Record) GetData

func (o *Record) GetData() string

GetData returns the Data field value

func (*Record) GetDataOk

func (o *Record) GetDataOk() (*string, bool)

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

func (*Record) GetName

func (o *Record) GetName() string

GetName returns the Name field value

func (*Record) GetNameOk

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

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

func (*Record) GetTtl

func (o *Record) GetTtl() int32

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

func (*Record) GetTtlOk

func (o *Record) 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 (*Record) GetType

func (o *Record) GetType() RecordType

GetType returns the Type field value

func (*Record) GetTypeOk

func (o *Record) GetTypeOk() (*RecordType, bool)

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

func (*Record) HasTtl

func (o *Record) HasTtl() bool

HasTtl returns a boolean if a field has been set.

func (Record) MarshalJSON

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

func (*Record) SetClass

func (o *Record) SetClass(v string)

SetClass sets field value

func (*Record) SetData

func (o *Record) SetData(v string)

SetData sets field value

func (*Record) SetName

func (o *Record) SetName(v string)

SetName sets field value

func (*Record) SetTtl

func (o *Record) SetTtl(v int32)

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

func (*Record) SetType

func (o *Record) SetType(v RecordType)

SetType sets field value

type RecordClass

type RecordClass string

RecordClass Resource record classes as defined in <see href=\"https://tools.ietf.org/html/rfc1035#section-3.2.4\">rfc1035</see>

const (
	IN RecordClass = "IN"
	CS RecordClass = "CS"
	CH RecordClass = "CH"
	HS RecordClass = "HS"
)

List of RecordClass

func (RecordClass) Ptr

func (v RecordClass) Ptr() *RecordClass

Ptr returns reference to RecordClass value

func (*RecordClass) UnmarshalJSON

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

type RecordType

type RecordType string

RecordType Resource record types as defined in <see href=\"https://tools.ietf.org/html/rfc1035#section-3.2.2\">rfc1035</see>

const (
	A     RecordType = "A"
	NS    RecordType = "NS"
	CNAME RecordType = "CNAME"
	SOA   RecordType = "SOA"
	PTR   RecordType = "PTR"
	MX    RecordType = "MX"
	TXT   RecordType = "TXT"
	SRV   RecordType = "SRV"
	AAAA  RecordType = "AAAA"
	SPF   RecordType = "SPF"
)

List of RecordType

func (RecordType) Ptr

func (v RecordType) Ptr() *RecordType

Ptr returns reference to RecordType value

func (*RecordType) UnmarshalJSON

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

type RecordsApi

type RecordsApi interface {

	/*
	 * ApiDnsRecordsDelete Deletes records which match the specified criterias
	 * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	 * @return ApiApiDnsRecordsDeleteRequest
	 */
	ApiDnsRecordsDelete(ctx _context.Context) ApiApiDnsRecordsDeleteRequest

	/*
	 * ApiDnsRecordsDeleteExecute executes the request
	 */
	ApiDnsRecordsDeleteExecute(r ApiApiDnsRecordsDeleteRequest) (*_nethttp.Response, GenericOpenAPIError)

	/*
	 * ApiDnsRecordsGet Retrieves the DNS zone's resource records
	 * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	 * @return ApiApiDnsRecordsGetRequest
	 */
	ApiDnsRecordsGet(ctx _context.Context) ApiApiDnsRecordsGetRequest

	/*
	 * ApiDnsRecordsGetExecute executes the request
	 * @return []Record
	 */
	ApiDnsRecordsGetExecute(r ApiApiDnsRecordsGetRequest) ([]Record, *_nethttp.Response, GenericOpenAPIError)

	/*
	 * ApiDnsRecordsPost Creates a new DNS resource record
	 * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	 * @return ApiApiDnsRecordsPostRequest
	 */
	ApiDnsRecordsPost(ctx _context.Context) ApiApiDnsRecordsPostRequest

	/*
	 * ApiDnsRecordsPostExecute executes the request
	 * @return Record
	 */
	ApiDnsRecordsPostExecute(r ApiApiDnsRecordsPostRequest) (Record, *_nethttp.Response, GenericOpenAPIError)
}

type RecordsApiService

type RecordsApiService service

RecordsApiService RecordsApi service

func (*RecordsApiService) ApiDnsRecordsDelete

* ApiDnsRecordsDelete Deletes records which match the specified criterias * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiApiDnsRecordsDeleteRequest

func (*RecordsApiService) ApiDnsRecordsDeleteExecute

* Execute executes the request

func (*RecordsApiService) ApiDnsRecordsGet

* ApiDnsRecordsGet Retrieves the DNS zone's resource records * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiApiDnsRecordsGetRequest

func (*RecordsApiService) ApiDnsRecordsGetExecute

* Execute executes the request * @return []Record

func (*RecordsApiService) ApiDnsRecordsPost

* ApiDnsRecordsPost Creates a new DNS resource record * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiApiDnsRecordsPostRequest

func (*RecordsApiService) ApiDnsRecordsPostExecute

* Execute executes the request * @return Record

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 Zone

type Zone struct {
	Name string `json:"name"`
}

Zone struct for Zone

func NewZone

func NewZone(name string) *Zone

NewZone instantiates a new Zone 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 NewZoneWithDefaults

func NewZoneWithDefaults() *Zone

NewZoneWithDefaults instantiates a new Zone 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 (*Zone) GetName

func (o *Zone) GetName() string

GetName returns the Name field value

func (*Zone) GetNameOk

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

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

func (Zone) MarshalJSON

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

func (*Zone) SetName

func (o *Zone) SetName(v string)

SetName sets field value

type ZonesApi

type ZonesApi interface {

	/*
	 * ApiDnsZonesGet Retrieves the DNS zones assigned to the account
	 * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	 * @return ApiApiDnsZonesGetRequest
	 */
	ApiDnsZonesGet(ctx _context.Context) ApiApiDnsZonesGetRequest

	/*
	 * ApiDnsZonesGetExecute executes the request
	 * @return []Zone
	 */
	ApiDnsZonesGetExecute(r ApiApiDnsZonesGetRequest) ([]Zone, *_nethttp.Response, GenericOpenAPIError)

	/*
	 * ApiDnsZonesPost Creates a new DNS zone
	 * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	 * @return ApiApiDnsZonesPostRequest
	 */
	ApiDnsZonesPost(ctx _context.Context) ApiApiDnsZonesPostRequest

	/*
	 * ApiDnsZonesPostExecute executes the request
	 * @return Zone
	 */
	ApiDnsZonesPostExecute(r ApiApiDnsZonesPostRequest) (Zone, *_nethttp.Response, GenericOpenAPIError)

	/*
	 * ApiDnsZonesZoneDelete Deletes a DNS zone from the passed provider
	 * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	 * @param zone Name of the DNS zone to delete
	 * @return ApiApiDnsZonesZoneDeleteRequest
	 */
	ApiDnsZonesZoneDelete(ctx _context.Context, zone string) ApiApiDnsZonesZoneDeleteRequest

	/*
	 * ApiDnsZonesZoneDeleteExecute executes the request
	 */
	ApiDnsZonesZoneDeleteExecute(r ApiApiDnsZonesZoneDeleteRequest) (*_nethttp.Response, GenericOpenAPIError)

	/*
	 * ApiDnsZonesZoneGet Loads the specified DNS zone
	 * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	 * @param zone Name of the DNS zone to load
	 * @return ApiApiDnsZonesZoneGetRequest
	 */
	ApiDnsZonesZoneGet(ctx _context.Context, zone string) ApiApiDnsZonesZoneGetRequest

	/*
	 * ApiDnsZonesZoneGetExecute executes the request
	 * @return Zone
	 */
	ApiDnsZonesZoneGetExecute(r ApiApiDnsZonesZoneGetRequest) (Zone, *_nethttp.Response, GenericOpenAPIError)
}

type ZonesApiService

type ZonesApiService service

ZonesApiService ZonesApi service

func (*ZonesApiService) ApiDnsZonesGet

* ApiDnsZonesGet Retrieves the DNS zones assigned to the account * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiApiDnsZonesGetRequest

func (*ZonesApiService) ApiDnsZonesGetExecute

* Execute executes the request * @return []Zone

func (*ZonesApiService) ApiDnsZonesPost

* ApiDnsZonesPost Creates a new DNS zone * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiApiDnsZonesPostRequest

func (*ZonesApiService) ApiDnsZonesPostExecute

* Execute executes the request * @return Zone

func (*ZonesApiService) ApiDnsZonesZoneDelete

func (a *ZonesApiService) ApiDnsZonesZoneDelete(ctx _context.Context, zone string) ApiApiDnsZonesZoneDeleteRequest

* ApiDnsZonesZoneDelete Deletes a DNS zone from the passed provider * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param zone Name of the DNS zone to delete * @return ApiApiDnsZonesZoneDeleteRequest

func (*ZonesApiService) ApiDnsZonesZoneDeleteExecute

* Execute executes the request

func (*ZonesApiService) ApiDnsZonesZoneGet

func (a *ZonesApiService) ApiDnsZonesZoneGet(ctx _context.Context, zone string) ApiApiDnsZonesZoneGetRequest

* ApiDnsZonesZoneGet Loads the specified DNS zone * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param zone Name of the DNS zone to load * @return ApiApiDnsZonesZoneGetRequest

func (*ZonesApiService) ApiDnsZonesZoneGetExecute

* Execute executes the request * @return Zone

Jump to

Keyboard shortcuts

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