domeneshop

package
v0.0.0-...-7c2b119 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: MIT Imports: 22 Imported by: 0

README

Go API client for domeneshop

Overview

Domeneshop offers a simple, REST-based API, which currently supports the following features:

  • List domains
  • List invoices
  • Create, read, update and delete DNS records for domains
  • Create, read, update and delete HTTP forwards ("WWW forwarding") for domains
  • Dynamic DNS (DDNS) update endpoints for use in consumer routers

More features are planned, including:

  • Web hosting administration
  • Email address and email user/account administration

Testing period

The API service is in version 0, which means it is possible that the interface will change rapidly during the testing period. For that reason, the documentation on these pages may sometimes be outdated.

Additionally, we make no guarantees about the stability of the API service during this testing period, and therefore ask customers to be careful with using the service for business critical purposes.

Authentication

The Domeneshop API currently supports only one method of authentication, HTTP Basic Auth. More authentication methods may be added in the future.

To generate credentials, visit <a href="https://www.domeneshop.no/admin?view=api" target="_blank">this page after logging in to the control panel on our website:

<a href="https://www.domeneshop.no/admin?view=api" target="_blank">https://www.domeneshop.no/admin?view=api

Libraries

Domeneshop maintains multiple API libraries to simplify using the API. Please note that these libraries have the same stability guarantees to the API while the API is in version 0.

The libraries may be found in our Github repository.

Domeneshop also maintains a plugin for EFF's Certbot, which automates issuance and renewal of SSL-certificates on your own servers for domains that use Domeneshop's DNS service. This plugin is found in our Github repository here.

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: v0
  • 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 "./domeneshop"

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 https://api.domeneshop.no/v0

Class Method HTTP request Description
DdnsApi ModifyDynDns Get /dyndns/update Update
DnsApi CreateRecord Post /domains/{domainId}/dns Add DNS record
DnsApi DeleteRecord Delete /domains/{domainId}/dns/{recordId} Delete DNS record by ID
DnsApi GetRecord Get /domains/{domainId}/dns/{recordId} Find DNS record by ID
DnsApi GetRecords Get /domains/{domainId}/dns List DNS records
DnsApi ModifyRecord Put /domains/{domainId}/dns/{recordId} Update DNS record by ID
DomainsApi GetDomain Get /domains/{domainId} Find domain by ID
DomainsApi GetDomains Get /domains List domains
ForwardsApi CreateForward Post /domains/{domainId}/forwards Add forward
ForwardsApi DeleteForward Delete /domains/{domainId}/forwards/{host} Delete forward by host
ForwardsApi GetForward Get /domains/{domainId}/forwards/{host} Find forward by host
ForwardsApi GetForwards Get /domains/{domainId}/forwards List forwards
ForwardsApi ModifyForward Put /domains/{domainId}/forwards/{host} Update forward by host
InvoicesApi GetInvoice Get /invoices/{invoiceId} Find invoice by invoice number
InvoicesApi GetInvoices Get /invoices List invoices

Documentation For Models

Documentation For Authorization

basicAuth
  • Type: HTTP basic authentication

Example

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

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

kundeservice@domeneshop.no

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 {
	DdnsApi *DdnsApiService

	DnsApi *DnsApiService

	DomainsApi *DomainsApiService

	ForwardsApi *ForwardsApiService

	InvoicesApi *InvoicesApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Domeneshop API Documentation API vv0 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 ApiCreateForwardRequest

type ApiCreateForwardRequest struct {
	ApiService *ForwardsApiService
	// contains filtered or unexported fields
}

func (ApiCreateForwardRequest) Execute

func (ApiCreateForwardRequest) HTTPForward

func (r ApiCreateForwardRequest) HTTPForward(hTTPForward HTTPForward) ApiCreateForwardRequest

type ApiCreateRecordRequest

type ApiCreateRecordRequest struct {
	ApiService *DnsApiService
	// contains filtered or unexported fields
}

func (ApiCreateRecordRequest) DNSRecord

func (ApiCreateRecordRequest) Execute

type ApiDeleteForwardRequest

type ApiDeleteForwardRequest struct {
	ApiService *ForwardsApiService
	// contains filtered or unexported fields
}

func (ApiDeleteForwardRequest) Execute

type ApiDeleteRecordRequest

type ApiDeleteRecordRequest struct {
	ApiService *DnsApiService
	// contains filtered or unexported fields
}

func (ApiDeleteRecordRequest) Execute

type ApiGetDomainRequest

type ApiGetDomainRequest struct {
	ApiService *DomainsApiService
	// contains filtered or unexported fields
}

func (ApiGetDomainRequest) Execute

type ApiGetDomainsRequest

type ApiGetDomainsRequest struct {
	ApiService *DomainsApiService
	// contains filtered or unexported fields
}

func (ApiGetDomainsRequest) Domain

func (ApiGetDomainsRequest) Execute

type ApiGetForwardRequest

type ApiGetForwardRequest struct {
	ApiService *ForwardsApiService
	// contains filtered or unexported fields
}

func (ApiGetForwardRequest) Execute

type ApiGetForwardsRequest

type ApiGetForwardsRequest struct {
	ApiService *ForwardsApiService
	// contains filtered or unexported fields
}

func (ApiGetForwardsRequest) Execute

type ApiGetInvoiceRequest

type ApiGetInvoiceRequest struct {
	ApiService *InvoicesApiService
	// contains filtered or unexported fields
}

func (ApiGetInvoiceRequest) Execute

type ApiGetInvoicesRequest

type ApiGetInvoicesRequest struct {
	ApiService *InvoicesApiService
	// contains filtered or unexported fields
}

func (ApiGetInvoicesRequest) Execute

func (ApiGetInvoicesRequest) Status

type ApiGetRecordRequest

type ApiGetRecordRequest struct {
	ApiService *DnsApiService
	// contains filtered or unexported fields
}

func (ApiGetRecordRequest) Execute

type ApiGetRecordsRequest

type ApiGetRecordsRequest struct {
	ApiService *DnsApiService
	// contains filtered or unexported fields
}

func (ApiGetRecordsRequest) Execute

func (ApiGetRecordsRequest) Host

func (ApiGetRecordsRequest) Type_

type ApiModifyDynDnsRequest

type ApiModifyDynDnsRequest struct {
	ApiService *DdnsApiService
	// contains filtered or unexported fields
}

func (ApiModifyDynDnsRequest) Execute

func (ApiModifyDynDnsRequest) Hostname

func (ApiModifyDynDnsRequest) Myip

type ApiModifyForwardRequest

type ApiModifyForwardRequest struct {
	ApiService *ForwardsApiService
	// contains filtered or unexported fields
}

func (ApiModifyForwardRequest) Execute

func (ApiModifyForwardRequest) HTTPForward

func (r ApiModifyForwardRequest) HTTPForward(hTTPForward HTTPForward) ApiModifyForwardRequest

type ApiModifyRecordRequest

type ApiModifyRecordRequest struct {
	ApiService *DnsApiService
	// contains filtered or unexported fields
}

func (ApiModifyRecordRequest) DNSRecord

func (ApiModifyRecordRequest) Execute

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 DNSRecord

type DNSRecord struct {
	// ID of DNS record
	Id int32 `json:"id"`
	// The host/subdomain the DNS record applies to
	Host string `json:"host"`
	// TTL of DNS record in seconds. Must be a multiple of 60.
	Ttl  *int32 `json:"ttl,omitempty"`
	Type string `json:"type"`
	// The value of the record.
	Data string `json:"data"`
	// MX/SRV record priority, also known as preference. Lower values are usually preferred first, but this is not guaranteed
	Priority *string `json:"priority,omitempty"`
	// SRV record weight. Relevant if multiple records have same preference
	Weight *string `json:"weight,omitempty"`
	// SRV record port. The port where the service is found.
	Port *string `json:"port,omitempty"`
	// CAA record flags.
	Flags *string `json:"flags,omitempty"`
	// CAA/DS record tag.
	Tag *string `json:"tag,omitempty"`
	// DS record algorithm.
	Alg *string `json:"alg,omitempty"`
	// DS record digest type.
	Digest *string `json:"digest,omitempty"`
	// TLSA record certificate usage.
	Usage *string `json:"usage,omitempty"`
	// TLSA record selector.
	Selector *string `json:"selector,omitempty"`
	// TLSA record matching type.
	Dtype *string `json:"dtype,omitempty"`
}

DNSRecord struct for DNSRecord

func NewDNSRecord

func NewDNSRecord(id int32, host string, recordType string, data string) *DNSRecord

NewDNSRecord instantiates a new DNSRecord 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 NewDNSRecordWithDefaults

func NewDNSRecordWithDefaults() *DNSRecord

NewDNSRecordWithDefaults instantiates a new DNSRecord 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 (*DNSRecord) GetAlg

func (o *DNSRecord) GetAlg() string

GetAlg returns the Alg field value if set, zero value otherwise.

func (*DNSRecord) GetAlgOk

func (o *DNSRecord) GetAlgOk() (*string, bool)

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

func (*DNSRecord) GetData

func (o *DNSRecord) GetData() string

GetData returns the Data field value

func (*DNSRecord) GetDataOk

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

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

func (*DNSRecord) GetDigest

func (o *DNSRecord) GetDigest() string

GetDigest returns the Digest field value if set, zero value otherwise.

func (*DNSRecord) GetDigestOk

func (o *DNSRecord) GetDigestOk() (*string, bool)

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

func (*DNSRecord) GetDtype

func (o *DNSRecord) GetDtype() string

GetDtype returns the Dtype field value if set, zero value otherwise.

func (*DNSRecord) GetDtypeOk

func (o *DNSRecord) GetDtypeOk() (*string, bool)

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

func (*DNSRecord) GetFlags

func (o *DNSRecord) GetFlags() string

GetFlags returns the Flags field value if set, zero value otherwise.

func (*DNSRecord) GetFlagsOk

func (o *DNSRecord) GetFlagsOk() (*string, bool)

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

func (*DNSRecord) GetHost

func (o *DNSRecord) GetHost() string

GetHost returns the Host field value

func (*DNSRecord) GetHostOk

func (o *DNSRecord) GetHostOk() (*string, bool)

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

func (*DNSRecord) GetId

func (o *DNSRecord) GetId() int32

GetId returns the Id field value

func (*DNSRecord) GetIdOk

func (o *DNSRecord) GetIdOk() (*int32, bool)

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

func (*DNSRecord) GetPort

func (o *DNSRecord) GetPort() string

GetPort returns the Port field value if set, zero value otherwise.

func (*DNSRecord) GetPortOk

func (o *DNSRecord) GetPortOk() (*string, bool)

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

func (*DNSRecord) GetPriority

func (o *DNSRecord) GetPriority() string

GetPriority returns the Priority field value if set, zero value otherwise.

func (*DNSRecord) GetPriorityOk

func (o *DNSRecord) GetPriorityOk() (*string, bool)

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

func (*DNSRecord) GetSelector

func (o *DNSRecord) GetSelector() string

GetSelector returns the Selector field value if set, zero value otherwise.

func (*DNSRecord) GetSelectorOk

func (o *DNSRecord) GetSelectorOk() (*string, bool)

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

func (*DNSRecord) GetTag

func (o *DNSRecord) GetTag() string

GetTag returns the Tag field value if set, zero value otherwise.

func (*DNSRecord) GetTagOk

func (o *DNSRecord) GetTagOk() (*string, bool)

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

func (*DNSRecord) GetTtl

func (o *DNSRecord) GetTtl() int32

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

func (*DNSRecord) GetTtlOk

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

func (o *DNSRecord) GetType() string

GetType returns the Type field value

func (*DNSRecord) GetTypeOk

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

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

func (*DNSRecord) GetUsage

func (o *DNSRecord) GetUsage() string

GetUsage returns the Usage field value if set, zero value otherwise.

func (*DNSRecord) GetUsageOk

func (o *DNSRecord) GetUsageOk() (*string, bool)

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

func (*DNSRecord) GetWeight

func (o *DNSRecord) GetWeight() string

GetWeight returns the Weight field value if set, zero value otherwise.

func (*DNSRecord) GetWeightOk

func (o *DNSRecord) GetWeightOk() (*string, bool)

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

func (*DNSRecord) HasAlg

func (o *DNSRecord) HasAlg() bool

HasAlg returns a boolean if a field has been set.

func (*DNSRecord) HasDigest

func (o *DNSRecord) HasDigest() bool

HasDigest returns a boolean if a field has been set.

func (*DNSRecord) HasDtype

func (o *DNSRecord) HasDtype() bool

HasDtype returns a boolean if a field has been set.

func (*DNSRecord) HasFlags

func (o *DNSRecord) HasFlags() bool

HasFlags returns a boolean if a field has been set.

func (*DNSRecord) HasPort

func (o *DNSRecord) HasPort() bool

HasPort returns a boolean if a field has been set.

func (*DNSRecord) HasPriority

func (o *DNSRecord) HasPriority() bool

HasPriority returns a boolean if a field has been set.

func (*DNSRecord) HasSelector

func (o *DNSRecord) HasSelector() bool

HasSelector returns a boolean if a field has been set.

func (*DNSRecord) HasTag

func (o *DNSRecord) HasTag() bool

HasTag returns a boolean if a field has been set.

func (*DNSRecord) HasTtl

func (o *DNSRecord) HasTtl() bool

HasTtl returns a boolean if a field has been set.

func (*DNSRecord) HasUsage

func (o *DNSRecord) HasUsage() bool

HasUsage returns a boolean if a field has been set.

func (*DNSRecord) HasWeight

func (o *DNSRecord) HasWeight() bool

HasWeight returns a boolean if a field has been set.

func (DNSRecord) MarshalJSON

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

func (*DNSRecord) SetAlg

func (o *DNSRecord) SetAlg(v string)

SetAlg gets a reference to the given string and assigns it to the Alg field.

func (*DNSRecord) SetData

func (o *DNSRecord) SetData(v string)

SetData sets field value

func (*DNSRecord) SetDigest

func (o *DNSRecord) SetDigest(v string)

SetDigest gets a reference to the given string and assigns it to the Digest field.

func (*DNSRecord) SetDtype

func (o *DNSRecord) SetDtype(v string)

SetDtype gets a reference to the given string and assigns it to the Dtype field.

func (*DNSRecord) SetFlags

func (o *DNSRecord) SetFlags(v string)

SetFlags gets a reference to the given string and assigns it to the Flags field.

func (*DNSRecord) SetHost

func (o *DNSRecord) SetHost(v string)

SetHost sets field value

func (*DNSRecord) SetId

func (o *DNSRecord) SetId(v int32)

SetId sets field value

func (*DNSRecord) SetPort

func (o *DNSRecord) SetPort(v string)

SetPort gets a reference to the given string and assigns it to the Port field.

func (*DNSRecord) SetPriority

func (o *DNSRecord) SetPriority(v string)

SetPriority gets a reference to the given string and assigns it to the Priority field.

func (*DNSRecord) SetSelector

func (o *DNSRecord) SetSelector(v string)

SetSelector gets a reference to the given string and assigns it to the Selector field.

func (*DNSRecord) SetTag

func (o *DNSRecord) SetTag(v string)

SetTag gets a reference to the given string and assigns it to the Tag field.

func (*DNSRecord) SetTtl

func (o *DNSRecord) SetTtl(v int32)

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

func (*DNSRecord) SetType

func (o *DNSRecord) SetType(v string)

SetType sets field value

func (*DNSRecord) SetUsage

func (o *DNSRecord) SetUsage(v string)

SetUsage gets a reference to the given string and assigns it to the Usage field.

func (*DNSRecord) SetWeight

func (o *DNSRecord) SetWeight(v string)

SetWeight gets a reference to the given string and assigns it to the Weight field.

type DdnsApiService

type DdnsApiService service

DdnsApiService DdnsApi service

func (*DdnsApiService) ModifyDynDns

  • ModifyDynDns Update
  • Update DNS using the "IP update protocol".

A DNS record for the given hostname will be created if it does not exist, or updated if it does. The record type (`A` or `AAAA` will automatically be detected).

If the DDNS implementation does not allow you to specify authentication, it can usually be specified inline in the URL:

 ```
 https://{token}:{secret}@api.domeneshop.no/v0/dyndns/update?hostname=example.com&myip=127.0.0.1
 ```

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

func (*DdnsApiService) ModifyDynDnsExecute

* Execute executes the request

type DnsApiService

type DnsApiService service

DnsApiService DnsApi service

func (*DnsApiService) CreateRecord

func (a *DnsApiService) CreateRecord(ctx _context.Context, domainId int32) ApiCreateRecordRequest

* CreateRecord Add DNS record * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param domainId ID of the domain * @return ApiCreateRecordRequest

func (*DnsApiService) CreateRecordExecute

* Execute executes the request * @return InlineResponse201

func (*DnsApiService) DeleteRecord

func (a *DnsApiService) DeleteRecord(ctx _context.Context, domainId int32, recordId int32) ApiDeleteRecordRequest

* DeleteRecord Delete DNS record by ID * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param domainId ID of the domain * @param recordId ID of DNS record * @return ApiDeleteRecordRequest

func (*DnsApiService) DeleteRecordExecute

* Execute executes the request

func (*DnsApiService) GetRecord

func (a *DnsApiService) GetRecord(ctx _context.Context, domainId int32, recordId int32) ApiGetRecordRequest

* GetRecord Find DNS record by ID * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param domainId ID of the domain * @param recordId ID of DNS record * @return ApiGetRecordRequest

func (*DnsApiService) GetRecordExecute

* Execute executes the request * @return DNSRecord

func (*DnsApiService) GetRecords

func (a *DnsApiService) GetRecords(ctx _context.Context, domainId int32) ApiGetRecordsRequest

* GetRecords List DNS records * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param domainId ID of the domain * @return ApiGetRecordsRequest

func (*DnsApiService) GetRecordsExecute

* Execute executes the request * @return []DNSRecord

func (*DnsApiService) ModifyRecord

func (a *DnsApiService) ModifyRecord(ctx _context.Context, domainId int32, recordId int32) ApiModifyRecordRequest

* ModifyRecord Update DNS record by ID * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param domainId ID of the domain * @param recordId ID of DNS record * @return ApiModifyRecordRequest

func (*DnsApiService) ModifyRecordExecute

* Execute executes the request

type Domain

type Domain struct {
	Id             *int32  `json:"id,omitempty"`
	Domain         *string `json:"domain,omitempty"`
	ExpiryDate     *string `json:"expiry_date,omitempty"`
	RegisteredDate *string `json:"registered_date,omitempty"`
	Renew          *bool   `json:"renew,omitempty"`
	Registrant     *string `json:"registrant,omitempty"`
	// Domain status
	Status      *string         `json:"status,omitempty"`
	Nameservers *[]string       `json:"nameservers,omitempty"`
	Services    *DomainServices `json:"services,omitempty"`
}

Domain struct for Domain

func NewDomain

func NewDomain() *Domain

NewDomain instantiates a new Domain 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 NewDomainWithDefaults

func NewDomainWithDefaults() *Domain

NewDomainWithDefaults instantiates a new Domain 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 (*Domain) GetDomain

func (o *Domain) GetDomain() string

GetDomain returns the Domain field value if set, zero value otherwise.

func (*Domain) GetDomainOk

func (o *Domain) GetDomainOk() (*string, bool)

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

func (*Domain) GetExpiryDate

func (o *Domain) GetExpiryDate() string

GetExpiryDate returns the ExpiryDate field value if set, zero value otherwise.

func (*Domain) GetExpiryDateOk

func (o *Domain) GetExpiryDateOk() (*string, bool)

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

func (*Domain) GetId

func (o *Domain) GetId() int32

GetId returns the Id field value if set, zero value otherwise.

func (*Domain) GetIdOk

func (o *Domain) GetIdOk() (*int32, bool)

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

func (*Domain) GetNameservers

func (o *Domain) GetNameservers() []string

GetNameservers returns the Nameservers field value if set, zero value otherwise.

func (*Domain) GetNameserversOk

func (o *Domain) GetNameserversOk() (*[]string, bool)

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

func (*Domain) GetRegisteredDate

func (o *Domain) GetRegisteredDate() string

GetRegisteredDate returns the RegisteredDate field value if set, zero value otherwise.

func (*Domain) GetRegisteredDateOk

func (o *Domain) GetRegisteredDateOk() (*string, bool)

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

func (*Domain) GetRegistrant

func (o *Domain) GetRegistrant() string

GetRegistrant returns the Registrant field value if set, zero value otherwise.

func (*Domain) GetRegistrantOk

func (o *Domain) GetRegistrantOk() (*string, bool)

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

func (*Domain) GetRenew

func (o *Domain) GetRenew() bool

GetRenew returns the Renew field value if set, zero value otherwise.

func (*Domain) GetRenewOk

func (o *Domain) GetRenewOk() (*bool, bool)

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

func (*Domain) GetServices

func (o *Domain) GetServices() DomainServices

GetServices returns the Services field value if set, zero value otherwise.

func (*Domain) GetServicesOk

func (o *Domain) GetServicesOk() (*DomainServices, bool)

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

func (*Domain) GetStatus

func (o *Domain) GetStatus() string

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

func (*Domain) GetStatusOk

func (o *Domain) 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 (*Domain) HasDomain

func (o *Domain) HasDomain() bool

HasDomain returns a boolean if a field has been set.

func (*Domain) HasExpiryDate

func (o *Domain) HasExpiryDate() bool

HasExpiryDate returns a boolean if a field has been set.

func (*Domain) HasId

func (o *Domain) HasId() bool

HasId returns a boolean if a field has been set.

func (*Domain) HasNameservers

func (o *Domain) HasNameservers() bool

HasNameservers returns a boolean if a field has been set.

func (*Domain) HasRegisteredDate

func (o *Domain) HasRegisteredDate() bool

HasRegisteredDate returns a boolean if a field has been set.

func (*Domain) HasRegistrant

func (o *Domain) HasRegistrant() bool

HasRegistrant returns a boolean if a field has been set.

func (*Domain) HasRenew

func (o *Domain) HasRenew() bool

HasRenew returns a boolean if a field has been set.

func (*Domain) HasServices

func (o *Domain) HasServices() bool

HasServices returns a boolean if a field has been set.

func (*Domain) HasStatus

func (o *Domain) HasStatus() bool

HasStatus returns a boolean if a field has been set.

func (Domain) MarshalJSON

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

func (*Domain) SetDomain

func (o *Domain) SetDomain(v string)

SetDomain gets a reference to the given string and assigns it to the Domain field.

func (*Domain) SetExpiryDate

func (o *Domain) SetExpiryDate(v string)

SetExpiryDate gets a reference to the given string and assigns it to the ExpiryDate field.

func (*Domain) SetId

func (o *Domain) SetId(v int32)

SetId gets a reference to the given int32 and assigns it to the Id field.

func (*Domain) SetNameservers

func (o *Domain) SetNameservers(v []string)

SetNameservers gets a reference to the given []string and assigns it to the Nameservers field.

func (*Domain) SetRegisteredDate

func (o *Domain) SetRegisteredDate(v string)

SetRegisteredDate gets a reference to the given string and assigns it to the RegisteredDate field.

func (*Domain) SetRegistrant

func (o *Domain) SetRegistrant(v string)

SetRegistrant gets a reference to the given string and assigns it to the Registrant field.

func (*Domain) SetRenew

func (o *Domain) SetRenew(v bool)

SetRenew gets a reference to the given bool and assigns it to the Renew field.

func (*Domain) SetServices

func (o *Domain) SetServices(v DomainServices)

SetServices gets a reference to the given DomainServices and assigns it to the Services field.

func (*Domain) SetStatus

func (o *Domain) SetStatus(v string)

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

type DomainServices

type DomainServices struct {
	Registrar *bool   `json:"registrar,omitempty"`
	Dns       *bool   `json:"dns,omitempty"`
	Email     *bool   `json:"email,omitempty"`
	Webhotel  *string `json:"webhotel,omitempty"`
}

DomainServices Domain services

func NewDomainServices

func NewDomainServices() *DomainServices

NewDomainServices instantiates a new DomainServices 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 NewDomainServicesWithDefaults

func NewDomainServicesWithDefaults() *DomainServices

NewDomainServicesWithDefaults instantiates a new DomainServices 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 (*DomainServices) GetDns

func (o *DomainServices) GetDns() bool

GetDns returns the Dns field value if set, zero value otherwise.

func (*DomainServices) GetDnsOk

func (o *DomainServices) GetDnsOk() (*bool, bool)

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

func (*DomainServices) GetEmail

func (o *DomainServices) GetEmail() bool

GetEmail returns the Email field value if set, zero value otherwise.

func (*DomainServices) GetEmailOk

func (o *DomainServices) GetEmailOk() (*bool, bool)

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

func (*DomainServices) GetRegistrar

func (o *DomainServices) GetRegistrar() bool

GetRegistrar returns the Registrar field value if set, zero value otherwise.

func (*DomainServices) GetRegistrarOk

func (o *DomainServices) GetRegistrarOk() (*bool, bool)

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

func (*DomainServices) GetWebhotel

func (o *DomainServices) GetWebhotel() string

GetWebhotel returns the Webhotel field value if set, zero value otherwise.

func (*DomainServices) GetWebhotelOk

func (o *DomainServices) GetWebhotelOk() (*string, bool)

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

func (*DomainServices) HasDns

func (o *DomainServices) HasDns() bool

HasDns returns a boolean if a field has been set.

func (*DomainServices) HasEmail

func (o *DomainServices) HasEmail() bool

HasEmail returns a boolean if a field has been set.

func (*DomainServices) HasRegistrar

func (o *DomainServices) HasRegistrar() bool

HasRegistrar returns a boolean if a field has been set.

func (*DomainServices) HasWebhotel

func (o *DomainServices) HasWebhotel() bool

HasWebhotel returns a boolean if a field has been set.

func (DomainServices) MarshalJSON

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

func (*DomainServices) SetDns

func (o *DomainServices) SetDns(v bool)

SetDns gets a reference to the given bool and assigns it to the Dns field.

func (*DomainServices) SetEmail

func (o *DomainServices) SetEmail(v bool)

SetEmail gets a reference to the given bool and assigns it to the Email field.

func (*DomainServices) SetRegistrar

func (o *DomainServices) SetRegistrar(v bool)

SetRegistrar gets a reference to the given bool and assigns it to the Registrar field.

func (*DomainServices) SetWebhotel

func (o *DomainServices) SetWebhotel(v string)

SetWebhotel gets a reference to the given string and assigns it to the Webhotel field.

type DomainsApiService

type DomainsApiService service

DomainsApiService DomainsApi service

func (*DomainsApiService) GetDomain

func (a *DomainsApiService) GetDomain(ctx _context.Context, domainId int32) ApiGetDomainRequest

* GetDomain Find domain by ID * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param domainId ID of the domain * @return ApiGetDomainRequest

func (*DomainsApiService) GetDomainExecute

* Execute executes the request * @return Domain

func (*DomainsApiService) GetDomains

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

func (*DomainsApiService) GetDomainsExecute

* Execute executes the request * @return []Domain

type ForwardsApiService

type ForwardsApiService service

ForwardsApiService ForwardsApi service

func (*ForwardsApiService) CreateForward

func (a *ForwardsApiService) CreateForward(ctx _context.Context, domainId int32) ApiCreateForwardRequest
  • CreateForward Add forward
  • Create a forwarding for the specified domain, to a given URL.

The forward must not collide with any existing forwarding or DNS record of types `A`, `AAAA`, `ANAME` or `CNAME`.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param domainId ID of the domain
  • @return ApiCreateForwardRequest

func (*ForwardsApiService) CreateForwardExecute

* Execute executes the request

func (*ForwardsApiService) DeleteForward

func (a *ForwardsApiService) DeleteForward(ctx _context.Context, domainId int32, host string) ApiDeleteForwardRequest

* DeleteForward Delete forward by host * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param domainId ID of the domain * @param host Subdomain of the forward, `@` for the root domain * @return ApiDeleteForwardRequest

func (*ForwardsApiService) DeleteForwardExecute

* Execute executes the request

func (*ForwardsApiService) GetForward

func (a *ForwardsApiService) GetForward(ctx _context.Context, domainId int32, host string) ApiGetForwardRequest

* GetForward Find forward by host * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param domainId ID of the domain * @param host Subdomain of the forward, `@` for the root domain * @return ApiGetForwardRequest

func (*ForwardsApiService) GetForwardExecute

* Execute executes the request * @return HTTPForward

func (*ForwardsApiService) GetForwards

func (a *ForwardsApiService) GetForwards(ctx _context.Context, domainId int32) ApiGetForwardsRequest

* GetForwards List forwards * List all forwards for the specified domain. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param domainId ID of the domain * @return ApiGetForwardsRequest

func (*ForwardsApiService) GetForwardsExecute

* Execute executes the request * @return []HTTPForward

func (*ForwardsApiService) ModifyForward

func (a *ForwardsApiService) ModifyForward(ctx _context.Context, domainId int32, host string) ApiModifyForwardRequest
  • ModifyForward Update forward by host
  • Update a forwarding for the specified domain, to a given URL.

The `host` field must not be changed. In that case, delete the existing forwarding and recreate it for the new host/subdomain.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param domainId ID of the domain
  • @param host Subdomain of the forward, `@` for the root domain
  • @return ApiModifyForwardRequest

func (*ForwardsApiService) ModifyForwardExecute

* Execute executes the request * @return HTTPForward

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 HTTPForward

type HTTPForward struct {
	// The subdomain this forward applies to, without the domain part.  For instance, `www` in the context of the `example.com` domain signifies a forward for `www.example.com`.
	Host string `json:"host"`
	// Whether to enable frame forwarding using an iframe embed. **NOT** recommended for a variety of reasons.
	Frame *bool `json:"frame,omitempty"`
	// The URL to forward to. Must include scheme, e.g. `https://` or `ftp://`.
	Url string `json:"url"`
}

HTTPForward struct for HTTPForward

func NewHTTPForward

func NewHTTPForward(host string, url string) *HTTPForward

NewHTTPForward instantiates a new HTTPForward 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 NewHTTPForwardWithDefaults

func NewHTTPForwardWithDefaults() *HTTPForward

NewHTTPForwardWithDefaults instantiates a new HTTPForward 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 (*HTTPForward) GetFrame

func (o *HTTPForward) GetFrame() bool

GetFrame returns the Frame field value if set, zero value otherwise.

func (*HTTPForward) GetFrameOk

func (o *HTTPForward) GetFrameOk() (*bool, bool)

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

func (*HTTPForward) GetHost

func (o *HTTPForward) GetHost() string

GetHost returns the Host field value

func (*HTTPForward) GetHostOk

func (o *HTTPForward) GetHostOk() (*string, bool)

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

func (*HTTPForward) GetUrl

func (o *HTTPForward) GetUrl() string

GetUrl returns the Url field value

func (*HTTPForward) GetUrlOk

func (o *HTTPForward) GetUrlOk() (*string, bool)

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

func (*HTTPForward) HasFrame

func (o *HTTPForward) HasFrame() bool

HasFrame returns a boolean if a field has been set.

func (HTTPForward) MarshalJSON

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

func (*HTTPForward) SetFrame

func (o *HTTPForward) SetFrame(v bool)

SetFrame gets a reference to the given bool and assigns it to the Frame field.

func (*HTTPForward) SetHost

func (o *HTTPForward) SetHost(v string)

SetHost sets field value

func (*HTTPForward) SetUrl

func (o *HTTPForward) SetUrl(v string)

SetUrl sets field value

type InlineResponse201

type InlineResponse201 struct {
	// ID of the created DNS record
	Id *int32 `json:"id,omitempty"`
}

InlineResponse201 struct for InlineResponse201

func NewInlineResponse201

func NewInlineResponse201() *InlineResponse201

NewInlineResponse201 instantiates a new InlineResponse201 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 NewInlineResponse201WithDefaults

func NewInlineResponse201WithDefaults() *InlineResponse201

NewInlineResponse201WithDefaults instantiates a new InlineResponse201 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 (*InlineResponse201) GetId

func (o *InlineResponse201) GetId() int32

GetId returns the Id field value if set, zero value otherwise.

func (*InlineResponse201) GetIdOk

func (o *InlineResponse201) GetIdOk() (*int32, bool)

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

func (*InlineResponse201) HasId

func (o *InlineResponse201) HasId() bool

HasId returns a boolean if a field has been set.

func (InlineResponse201) MarshalJSON

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

func (*InlineResponse201) SetId

func (o *InlineResponse201) SetId(v int32)

SetId gets a reference to the given int32 and assigns it to the Id field.

type Invoice

type Invoice struct {
	// Invoice ID/number
	Id       *int32  `json:"id,omitempty"`
	Type     *string `json:"type,omitempty"`
	Amount   *int32  `json:"amount,omitempty"`
	Currency *string `json:"currency,omitempty"`
	// The invoice due date. Only available for type `invoice`.
	DueDate *string `json:"due_date,omitempty"`
	// The date when the invoice was issued.
	IssuedDate *string `json:"issued_date,omitempty"`
	// The payment date. Only available if the invoice has status `paid`.
	PaidDate *string `json:"paid_date,omitempty"`
	// `settled` is only applicable to credit notes. These are usually created if  domains have been
	Status *string `json:"status,omitempty"`
	Url    *string `json:"url,omitempty"`
}

Invoice struct for Invoice

func NewInvoice

func NewInvoice() *Invoice

NewInvoice instantiates a new Invoice 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 NewInvoiceWithDefaults

func NewInvoiceWithDefaults() *Invoice

NewInvoiceWithDefaults instantiates a new Invoice 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 (*Invoice) GetAmount

func (o *Invoice) GetAmount() int32

GetAmount returns the Amount field value if set, zero value otherwise.

func (*Invoice) GetAmountOk

func (o *Invoice) GetAmountOk() (*int32, bool)

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

func (*Invoice) GetCurrency

func (o *Invoice) GetCurrency() string

GetCurrency returns the Currency field value if set, zero value otherwise.

func (*Invoice) GetCurrencyOk

func (o *Invoice) GetCurrencyOk() (*string, bool)

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

func (*Invoice) GetDueDate

func (o *Invoice) GetDueDate() string

GetDueDate returns the DueDate field value if set, zero value otherwise.

func (*Invoice) GetDueDateOk

func (o *Invoice) GetDueDateOk() (*string, bool)

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

func (*Invoice) GetId

func (o *Invoice) GetId() int32

GetId returns the Id field value if set, zero value otherwise.

func (*Invoice) GetIdOk

func (o *Invoice) GetIdOk() (*int32, bool)

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

func (*Invoice) GetIssuedDate

func (o *Invoice) GetIssuedDate() string

GetIssuedDate returns the IssuedDate field value if set, zero value otherwise.

func (*Invoice) GetIssuedDateOk

func (o *Invoice) GetIssuedDateOk() (*string, bool)

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

func (*Invoice) GetPaidDate

func (o *Invoice) GetPaidDate() string

GetPaidDate returns the PaidDate field value if set, zero value otherwise.

func (*Invoice) GetPaidDateOk

func (o *Invoice) GetPaidDateOk() (*string, bool)

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

func (*Invoice) GetStatus

func (o *Invoice) GetStatus() string

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

func (*Invoice) GetStatusOk

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

func (o *Invoice) GetType() string

GetType returns the Type field value if set, zero value otherwise.

func (*Invoice) GetTypeOk

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

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

func (*Invoice) GetUrl

func (o *Invoice) GetUrl() string

GetUrl returns the Url field value if set, zero value otherwise.

func (*Invoice) GetUrlOk

func (o *Invoice) GetUrlOk() (*string, bool)

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

func (*Invoice) HasAmount

func (o *Invoice) HasAmount() bool

HasAmount returns a boolean if a field has been set.

func (*Invoice) HasCurrency

func (o *Invoice) HasCurrency() bool

HasCurrency returns a boolean if a field has been set.

func (*Invoice) HasDueDate

func (o *Invoice) HasDueDate() bool

HasDueDate returns a boolean if a field has been set.

func (*Invoice) HasId

func (o *Invoice) HasId() bool

HasId returns a boolean if a field has been set.

func (*Invoice) HasIssuedDate

func (o *Invoice) HasIssuedDate() bool

HasIssuedDate returns a boolean if a field has been set.

func (*Invoice) HasPaidDate

func (o *Invoice) HasPaidDate() bool

HasPaidDate returns a boolean if a field has been set.

func (*Invoice) HasStatus

func (o *Invoice) HasStatus() bool

HasStatus returns a boolean if a field has been set.

func (*Invoice) HasType

func (o *Invoice) HasType() bool

HasType returns a boolean if a field has been set.

func (*Invoice) HasUrl

func (o *Invoice) HasUrl() bool

HasUrl returns a boolean if a field has been set.

func (Invoice) MarshalJSON

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

func (*Invoice) SetAmount

func (o *Invoice) SetAmount(v int32)

SetAmount gets a reference to the given int32 and assigns it to the Amount field.

func (*Invoice) SetCurrency

func (o *Invoice) SetCurrency(v string)

SetCurrency gets a reference to the given string and assigns it to the Currency field.

func (*Invoice) SetDueDate

func (o *Invoice) SetDueDate(v string)

SetDueDate gets a reference to the given string and assigns it to the DueDate field.

func (*Invoice) SetId

func (o *Invoice) SetId(v int32)

SetId gets a reference to the given int32 and assigns it to the Id field.

func (*Invoice) SetIssuedDate

func (o *Invoice) SetIssuedDate(v string)

SetIssuedDate gets a reference to the given string and assigns it to the IssuedDate field.

func (*Invoice) SetPaidDate

func (o *Invoice) SetPaidDate(v string)

SetPaidDate gets a reference to the given string and assigns it to the PaidDate field.

func (*Invoice) SetStatus

func (o *Invoice) SetStatus(v string)

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

func (*Invoice) SetType

func (o *Invoice) SetType(v string)

SetType gets a reference to the given string and assigns it to the Type field.

func (*Invoice) SetUrl

func (o *Invoice) SetUrl(v string)

SetUrl gets a reference to the given string and assigns it to the Url field.

type InvoicesApiService

type InvoicesApiService service

InvoicesApiService InvoicesApi service

func (*InvoicesApiService) GetInvoice

func (a *InvoicesApiService) GetInvoice(ctx _context.Context, invoiceId int32) ApiGetInvoiceRequest

* GetInvoice Find invoice by invoice number * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param invoiceId An invoice number * @return ApiGetInvoiceRequest

func (*InvoicesApiService) GetInvoiceExecute

* Execute executes the request * @return Invoice

func (*InvoicesApiService) GetInvoices

* GetInvoices List invoices * List invoices for your account. Only invoices from the past 3 years are returned. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiGetInvoicesRequest

func (*InvoicesApiService) GetInvoicesExecute

* Execute executes the request * @return []Invoice

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 NullableDNSRecord

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

func NewNullableDNSRecord

func NewNullableDNSRecord(val *DNSRecord) *NullableDNSRecord

func (NullableDNSRecord) Get

func (v NullableDNSRecord) Get() *DNSRecord

func (NullableDNSRecord) IsSet

func (v NullableDNSRecord) IsSet() bool

func (NullableDNSRecord) MarshalJSON

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

func (*NullableDNSRecord) Set

func (v *NullableDNSRecord) Set(val *DNSRecord)

func (*NullableDNSRecord) UnmarshalJSON

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

func (*NullableDNSRecord) Unset

func (v *NullableDNSRecord) Unset()

type NullableDomain

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

func NewNullableDomain

func NewNullableDomain(val *Domain) *NullableDomain

func (NullableDomain) Get

func (v NullableDomain) Get() *Domain

func (NullableDomain) IsSet

func (v NullableDomain) IsSet() bool

func (NullableDomain) MarshalJSON

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

func (*NullableDomain) Set

func (v *NullableDomain) Set(val *Domain)

func (*NullableDomain) UnmarshalJSON

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

func (*NullableDomain) Unset

func (v *NullableDomain) Unset()

type NullableDomainServices

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

func NewNullableDomainServices

func NewNullableDomainServices(val *DomainServices) *NullableDomainServices

func (NullableDomainServices) Get

func (NullableDomainServices) IsSet

func (v NullableDomainServices) IsSet() bool

func (NullableDomainServices) MarshalJSON

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

func (*NullableDomainServices) Set

func (*NullableDomainServices) UnmarshalJSON

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

func (*NullableDomainServices) Unset

func (v *NullableDomainServices) 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 NullableHTTPForward

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

func NewNullableHTTPForward

func NewNullableHTTPForward(val *HTTPForward) *NullableHTTPForward

func (NullableHTTPForward) Get

func (NullableHTTPForward) IsSet

func (v NullableHTTPForward) IsSet() bool

func (NullableHTTPForward) MarshalJSON

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

func (*NullableHTTPForward) Set

func (v *NullableHTTPForward) Set(val *HTTPForward)

func (*NullableHTTPForward) UnmarshalJSON

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

func (*NullableHTTPForward) Unset

func (v *NullableHTTPForward) Unset()

type NullableInlineResponse201

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

func NewNullableInlineResponse201

func NewNullableInlineResponse201(val *InlineResponse201) *NullableInlineResponse201

func (NullableInlineResponse201) Get

func (NullableInlineResponse201) IsSet

func (v NullableInlineResponse201) IsSet() bool

func (NullableInlineResponse201) MarshalJSON

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

func (*NullableInlineResponse201) Set

func (*NullableInlineResponse201) UnmarshalJSON

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

func (*NullableInlineResponse201) Unset

func (v *NullableInlineResponse201) 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 NullableInvoice

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

func NewNullableInvoice

func NewNullableInvoice(val *Invoice) *NullableInvoice

func (NullableInvoice) Get

func (v NullableInvoice) Get() *Invoice

func (NullableInvoice) IsSet

func (v NullableInvoice) IsSet() bool

func (NullableInvoice) MarshalJSON

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

func (*NullableInvoice) Set

func (v *NullableInvoice) Set(val *Invoice)

func (*NullableInvoice) UnmarshalJSON

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

func (*NullableInvoice) Unset

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

Jump to

Keyboard shortcuts

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