service

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: BSD-3-Clause Imports: 10 Imported by: 1

Documentation

Overview

Package service provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.8.3 DO NOT EDIT.

Index

Constants

View Source
const (
	ApiKeyAuthScopes = "ApiKeyAuth.Scopes"
)

Variables

This section is empty.

Functions

func NewDeleteNetworkRequest

func NewDeleteNetworkRequest(server string, networkID string) (*http.Request, error)

NewDeleteNetworkRequest generates requests for DeleteNetwork

func NewGenerateControllerNetworkRequest

func NewGenerateControllerNetworkRequest(server string, controllerID string, body GenerateControllerNetworkJSONRequestBody) (*http.Request, error)

NewGenerateControllerNetworkRequest calls the generic GenerateControllerNetwork builder with application/json body

func NewGenerateControllerNetworkRequestWithBody

func NewGenerateControllerNetworkRequestWithBody(server string, controllerID string, contentType string, body io.Reader) (*http.Request, error)

NewGenerateControllerNetworkRequestWithBody generates requests for GenerateControllerNetwork with any type of body

func NewGetControllerNetworkMemberRequest

func NewGetControllerNetworkMemberRequest(server string, networkID string, nodeID string) (*http.Request, error)

NewGetControllerNetworkMemberRequest generates requests for GetControllerNetworkMember

func NewGetControllerNetworkMembersRequest

func NewGetControllerNetworkMembersRequest(server string, networkID string) (*http.Request, error)

NewGetControllerNetworkMembersRequest generates requests for GetControllerNetworkMembers

func NewGetControllerNetworkRequest

func NewGetControllerNetworkRequest(server string, networkID string) (*http.Request, error)

NewGetControllerNetworkRequest generates requests for GetControllerNetwork

func NewGetControllerNetworksRequest

func NewGetControllerNetworksRequest(server string) (*http.Request, error)

NewGetControllerNetworksRequest generates requests for GetControllerNetworks

func NewGetControllerStatusRequest

func NewGetControllerStatusRequest(server string) (*http.Request, error)

NewGetControllerStatusRequest generates requests for GetControllerStatus

func NewGetNetworkRequest

func NewGetNetworkRequest(server string, networkID string) (*http.Request, error)

NewGetNetworkRequest generates requests for GetNetwork

func NewGetNetworksRequest

func NewGetNetworksRequest(server string) (*http.Request, error)

NewGetNetworksRequest generates requests for GetNetworks

func NewGetPeerRequest

func NewGetPeerRequest(server string, address string) (*http.Request, error)

NewGetPeerRequest generates requests for GetPeer

func NewGetPeersRequest

func NewGetPeersRequest(server string) (*http.Request, error)

NewGetPeersRequest generates requests for GetPeers

func NewGetStatusRequest

func NewGetStatusRequest(server string) (*http.Request, error)

NewGetStatusRequest generates requests for GetStatus

func NewSetControllerNetworkRequest

func NewSetControllerNetworkRequest(server string, networkID string, body SetControllerNetworkJSONRequestBody) (*http.Request, error)

NewSetControllerNetworkRequest calls the generic SetControllerNetwork builder with application/json body

func NewSetControllerNetworkRequestWithBody

func NewSetControllerNetworkRequestWithBody(server string, networkID string, contentType string, body io.Reader) (*http.Request, error)

NewSetControllerNetworkRequestWithBody generates requests for SetControllerNetwork with any type of body

func NewUpdateNetworkRequest

func NewUpdateNetworkRequest(server string, networkID string, body UpdateNetworkJSONRequestBody) (*http.Request, error)

NewUpdateNetworkRequest calls the generic UpdateNetwork builder with application/json body

func NewUpdateNetworkRequestWithBody

func NewUpdateNetworkRequestWithBody(server string, networkID string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateNetworkRequestWithBody generates requests for UpdateNetwork with any type of body

Types

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) DeleteNetwork

func (c *Client) DeleteNetwork(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GenerateControllerNetwork

func (c *Client) GenerateControllerNetwork(ctx context.Context, controllerID string, body GenerateControllerNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GenerateControllerNetworkWithBody

func (c *Client) GenerateControllerNetworkWithBody(ctx context.Context, controllerID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetControllerNetwork

func (c *Client) GetControllerNetwork(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetControllerNetworkMember

func (c *Client) GetControllerNetworkMember(ctx context.Context, networkID string, nodeID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetControllerNetworkMembers

func (c *Client) GetControllerNetworkMembers(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetControllerNetworks

func (c *Client) GetControllerNetworks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetControllerStatus

func (c *Client) GetControllerStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetNetwork

func (c *Client) GetNetwork(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetNetworks

func (c *Client) GetNetworks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPeer

func (c *Client) GetPeer(ctx context.Context, address string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPeers

func (c *Client) GetPeers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetStatus

func (c *Client) GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetControllerNetwork

func (c *Client) SetControllerNetwork(ctx context.Context, networkID string, body SetControllerNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetControllerNetworkWithBody

func (c *Client) SetControllerNetworkWithBody(ctx context.Context, networkID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateNetwork

func (c *Client) UpdateNetwork(ctx context.Context, networkID string, body UpdateNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateNetworkWithBody

func (c *Client) UpdateNetworkWithBody(ctx context.Context, networkID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetControllerStatus request
	GetControllerStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetControllerNetworks request
	GetControllerNetworks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GenerateControllerNetwork request with any body
	GenerateControllerNetworkWithBody(ctx context.Context, controllerID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	GenerateControllerNetwork(ctx context.Context, controllerID string, body GenerateControllerNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetControllerNetwork request
	GetControllerNetwork(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetControllerNetwork request with any body
	SetControllerNetworkWithBody(ctx context.Context, networkID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SetControllerNetwork(ctx context.Context, networkID string, body SetControllerNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetControllerNetworkMembers request
	GetControllerNetworkMembers(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetControllerNetworkMember request
	GetControllerNetworkMember(ctx context.Context, networkID string, nodeID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetNetworks request
	GetNetworks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteNetwork request
	DeleteNetwork(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetNetwork request
	GetNetwork(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateNetwork request with any body
	UpdateNetworkWithBody(ctx context.Context, networkID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateNetwork(ctx context.Context, networkID string, body UpdateNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPeers request
	GetPeers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPeer request
	GetPeer(ctx context.Context, address string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetStatus request
	GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) DeleteNetworkWithResponse

func (c *ClientWithResponses) DeleteNetworkWithResponse(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*DeleteNetworkResponse, error)

DeleteNetworkWithResponse request returning *DeleteNetworkResponse

func (*ClientWithResponses) GenerateControllerNetworkWithBodyWithResponse

func (c *ClientWithResponses) GenerateControllerNetworkWithBodyWithResponse(ctx context.Context, controllerID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GenerateControllerNetworkResponse, error)

GenerateControllerNetworkWithBodyWithResponse request with arbitrary body returning *GenerateControllerNetworkResponse

func (*ClientWithResponses) GenerateControllerNetworkWithResponse

func (c *ClientWithResponses) GenerateControllerNetworkWithResponse(ctx context.Context, controllerID string, body GenerateControllerNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*GenerateControllerNetworkResponse, error)

func (*ClientWithResponses) GetControllerNetworkMemberWithResponse

func (c *ClientWithResponses) GetControllerNetworkMemberWithResponse(ctx context.Context, networkID string, nodeID string, reqEditors ...RequestEditorFn) (*GetControllerNetworkMemberResponse, error)

GetControllerNetworkMemberWithResponse request returning *GetControllerNetworkMemberResponse

func (*ClientWithResponses) GetControllerNetworkMembersWithResponse

func (c *ClientWithResponses) GetControllerNetworkMembersWithResponse(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*GetControllerNetworkMembersResponse, error)

GetControllerNetworkMembersWithResponse request returning *GetControllerNetworkMembersResponse

func (*ClientWithResponses) GetControllerNetworkWithResponse

func (c *ClientWithResponses) GetControllerNetworkWithResponse(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*GetControllerNetworkResponse, error)

GetControllerNetworkWithResponse request returning *GetControllerNetworkResponse

func (*ClientWithResponses) GetControllerNetworksWithResponse

func (c *ClientWithResponses) GetControllerNetworksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetControllerNetworksResponse, error)

GetControllerNetworksWithResponse request returning *GetControllerNetworksResponse

func (*ClientWithResponses) GetControllerStatusWithResponse

func (c *ClientWithResponses) GetControllerStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetControllerStatusResponse, error)

GetControllerStatusWithResponse request returning *GetControllerStatusResponse

func (*ClientWithResponses) GetNetworkWithResponse

func (c *ClientWithResponses) GetNetworkWithResponse(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*GetNetworkResponse, error)

GetNetworkWithResponse request returning *GetNetworkResponse

func (*ClientWithResponses) GetNetworksWithResponse

func (c *ClientWithResponses) GetNetworksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error)

GetNetworksWithResponse request returning *GetNetworksResponse

func (*ClientWithResponses) GetPeerWithResponse

func (c *ClientWithResponses) GetPeerWithResponse(ctx context.Context, address string, reqEditors ...RequestEditorFn) (*GetPeerResponse, error)

GetPeerWithResponse request returning *GetPeerResponse

func (*ClientWithResponses) GetPeersWithResponse

func (c *ClientWithResponses) GetPeersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPeersResponse, error)

GetPeersWithResponse request returning *GetPeersResponse

func (*ClientWithResponses) GetStatusWithResponse

func (c *ClientWithResponses) GetStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)

GetStatusWithResponse request returning *GetStatusResponse

func (*ClientWithResponses) SetControllerNetworkWithBodyWithResponse

func (c *ClientWithResponses) SetControllerNetworkWithBodyWithResponse(ctx context.Context, networkID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetControllerNetworkResponse, error)

SetControllerNetworkWithBodyWithResponse request with arbitrary body returning *SetControllerNetworkResponse

func (*ClientWithResponses) SetControllerNetworkWithResponse

func (c *ClientWithResponses) SetControllerNetworkWithResponse(ctx context.Context, networkID string, body SetControllerNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*SetControllerNetworkResponse, error)

func (*ClientWithResponses) UpdateNetworkWithBodyWithResponse

func (c *ClientWithResponses) UpdateNetworkWithBodyWithResponse(ctx context.Context, networkID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateNetworkResponse, error)

UpdateNetworkWithBodyWithResponse request with arbitrary body returning *UpdateNetworkResponse

func (*ClientWithResponses) UpdateNetworkWithResponse

func (c *ClientWithResponses) UpdateNetworkWithResponse(ctx context.Context, networkID string, body UpdateNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateNetworkResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetControllerStatus request
	GetControllerStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetControllerStatusResponse, error)

	// GetControllerNetworks request
	GetControllerNetworksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetControllerNetworksResponse, error)

	// GenerateControllerNetwork request with any body
	GenerateControllerNetworkWithBodyWithResponse(ctx context.Context, controllerID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GenerateControllerNetworkResponse, error)

	GenerateControllerNetworkWithResponse(ctx context.Context, controllerID string, body GenerateControllerNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*GenerateControllerNetworkResponse, error)

	// GetControllerNetwork request
	GetControllerNetworkWithResponse(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*GetControllerNetworkResponse, error)

	// SetControllerNetwork request with any body
	SetControllerNetworkWithBodyWithResponse(ctx context.Context, networkID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetControllerNetworkResponse, error)

	SetControllerNetworkWithResponse(ctx context.Context, networkID string, body SetControllerNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*SetControllerNetworkResponse, error)

	// GetControllerNetworkMembers request
	GetControllerNetworkMembersWithResponse(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*GetControllerNetworkMembersResponse, error)

	// GetControllerNetworkMember request
	GetControllerNetworkMemberWithResponse(ctx context.Context, networkID string, nodeID string, reqEditors ...RequestEditorFn) (*GetControllerNetworkMemberResponse, error)

	// GetNetworks request
	GetNetworksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error)

	// DeleteNetwork request
	DeleteNetworkWithResponse(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*DeleteNetworkResponse, error)

	// GetNetwork request
	GetNetworkWithResponse(ctx context.Context, networkID string, reqEditors ...RequestEditorFn) (*GetNetworkResponse, error)

	// UpdateNetwork request with any body
	UpdateNetworkWithBodyWithResponse(ctx context.Context, networkID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateNetworkResponse, error)

	UpdateNetworkWithResponse(ctx context.Context, networkID string, body UpdateNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateNetworkResponse, error)

	// GetPeers request
	GetPeersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPeersResponse, error)

	// GetPeer request
	GetPeerWithResponse(ctx context.Context, address string, reqEditors ...RequestEditorFn) (*GetPeerResponse, error)

	// GetStatus request
	GetStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type ControllerNetwork

type ControllerNetwork struct {
	Capabilities      *[]map[string]interface{} `json:"capabilities,omitempty"`
	CreationTime      *float32                  `json:"creationTime,omitempty"`
	EnableBroadcast   *bool                     `json:"enableBroadcast,omitempty"`
	Id                *string                   `json:"id,omitempty"`
	IpAssignmentPools *[]struct {
		IpRangeEnd   *string `json:"ipRangeEnd,omitempty"`
		IpRangeStart *string `json:"ipRangeStart,omitempty"`
	} `json:"ipAssignmentPools,omitempty"`
	Mtu               *int    `json:"mtu,omitempty"`
	MulticastLimit    *int    `json:"multicastLimit,omitempty"`
	Name              *string `json:"name,omitempty"`
	Nwid              *string `json:"nwid,omitempty"`
	Objtype           *string `json:"objtype,omitempty"`
	Private           *bool   `json:"private,omitempty"`
	RemoteTraceLevel  *int    `json:"remoteTraceLevel,omitempty"`
	RemoteTraceTarget *string `json:"remoteTraceTarget,omitempty"`
	Revision          *int    `json:"revision,omitempty"`
	Routes            *[]struct {
		Target *string `json:"target,omitempty"`
		Via    *string `json:"via"`
	} `json:"routes,omitempty"`
	Rules        *[]map[string]interface{} `json:"rules,omitempty"`
	Tags         *[]map[string]interface{} `json:"tags,omitempty"`
	V4AssignMode *struct {
		Zt *bool `json:"zt,omitempty"`
	} `json:"v4AssignMode,omitempty"`
	V6AssignMode *struct {
		N6plane *bool `json:"6plane,omitempty"`
		Rfc4193 *bool `json:"rfc4193,omitempty"`
		Zt      *bool `json:"zt,omitempty"`
	} `json:"v6AssignMode,omitempty"`
}

ControllerNetwork defines model for ControllerNetwork.

type ControllerNetworkMember

type ControllerNetworkMember struct {
	ActiveBridge  *bool     `json:"activeBridge,omitempty"`
	Address       *string   `json:"address,omitempty"`
	Authorized    *bool     `json:"authorized,omitempty"`
	Id            *string   `json:"id,omitempty"`
	Identity      *string   `json:"identity,omitempty"`
	IpAssignments *[]string `json:"ipAssignments,omitempty"`
	Nwid          *string   `json:"nwid,omitempty"`
	Revision      *int      `json:"revision,omitempty"`
	VMajor        *int      `json:"vMajor,omitempty"`
	VMinor        *int      `json:"vMinor,omitempty"`
	VProto        *int      `json:"vProto,omitempty"`
	VRev          *int      `json:"vRev,omitempty"`
}

ControllerNetworkMember defines model for ControllerNetworkMember.

type ControllerStatus

type ControllerStatus struct {
	ApiVersion *int   `json:"apiVersion,omitempty"`
	Clock      *int64 `json:"clock,omitempty"`
	Controller *bool  `json:"controller,omitempty"`
}

ControllerStatus defines model for ControllerStatus.

type DeleteNetworkResponse

type DeleteNetworkResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteNetworkResponse

func ParseDeleteNetworkResponse(rsp *http.Response) (*DeleteNetworkResponse, error)

ParseDeleteNetworkResponse parses an HTTP response from a DeleteNetworkWithResponse call

func (DeleteNetworkResponse) Status

func (r DeleteNetworkResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteNetworkResponse) StatusCode

func (r DeleteNetworkResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GenerateControllerNetworkJSONBody

type GenerateControllerNetworkJSONBody ControllerNetwork

GenerateControllerNetworkJSONBody defines parameters for GenerateControllerNetwork.

type GenerateControllerNetworkJSONRequestBody

type GenerateControllerNetworkJSONRequestBody GenerateControllerNetworkJSONBody

GenerateControllerNetworkJSONRequestBody defines body for GenerateControllerNetwork for application/json ContentType.

type GenerateControllerNetworkResponse

type GenerateControllerNetworkResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ControllerNetwork
}

func ParseGenerateControllerNetworkResponse

func ParseGenerateControllerNetworkResponse(rsp *http.Response) (*GenerateControllerNetworkResponse, error)

ParseGenerateControllerNetworkResponse parses an HTTP response from a GenerateControllerNetworkWithResponse call

func (GenerateControllerNetworkResponse) Status

Status returns HTTPResponse.Status

func (GenerateControllerNetworkResponse) StatusCode

func (r GenerateControllerNetworkResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetControllerNetworkMemberResponse

type GetControllerNetworkMemberResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ControllerNetworkMember
}

func ParseGetControllerNetworkMemberResponse

func ParseGetControllerNetworkMemberResponse(rsp *http.Response) (*GetControllerNetworkMemberResponse, error)

ParseGetControllerNetworkMemberResponse parses an HTTP response from a GetControllerNetworkMemberWithResponse call

func (GetControllerNetworkMemberResponse) Status

Status returns HTTPResponse.Status

func (GetControllerNetworkMemberResponse) StatusCode

func (r GetControllerNetworkMemberResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetControllerNetworkMembersResponse

type GetControllerNetworkMembersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		AdditionalProperties map[string]int `json:"-"`
	}
}

func ParseGetControllerNetworkMembersResponse

func ParseGetControllerNetworkMembersResponse(rsp *http.Response) (*GetControllerNetworkMembersResponse, error)

ParseGetControllerNetworkMembersResponse parses an HTTP response from a GetControllerNetworkMembersWithResponse call

func (GetControllerNetworkMembersResponse) Status

Status returns HTTPResponse.Status

func (GetControllerNetworkMembersResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetControllerNetworkResponse

type GetControllerNetworkResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ControllerNetwork
}

func ParseGetControllerNetworkResponse

func ParseGetControllerNetworkResponse(rsp *http.Response) (*GetControllerNetworkResponse, error)

ParseGetControllerNetworkResponse parses an HTTP response from a GetControllerNetworkWithResponse call

func (GetControllerNetworkResponse) Status

Status returns HTTPResponse.Status

func (GetControllerNetworkResponse) StatusCode

func (r GetControllerNetworkResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetControllerNetworksResponse

type GetControllerNetworksResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]string
}

func ParseGetControllerNetworksResponse

func ParseGetControllerNetworksResponse(rsp *http.Response) (*GetControllerNetworksResponse, error)

ParseGetControllerNetworksResponse parses an HTTP response from a GetControllerNetworksWithResponse call

func (GetControllerNetworksResponse) Status

Status returns HTTPResponse.Status

func (GetControllerNetworksResponse) StatusCode

func (r GetControllerNetworksResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetControllerStatusResponse

type GetControllerStatusResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ControllerStatus
}

func ParseGetControllerStatusResponse

func ParseGetControllerStatusResponse(rsp *http.Response) (*GetControllerStatusResponse, error)

ParseGetControllerStatusResponse parses an HTTP response from a GetControllerStatusWithResponse call

func (GetControllerStatusResponse) Status

Status returns HTTPResponse.Status

func (GetControllerStatusResponse) StatusCode

func (r GetControllerStatusResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetNetworkResponse

type GetNetworkResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Network
}

func ParseGetNetworkResponse

func ParseGetNetworkResponse(rsp *http.Response) (*GetNetworkResponse, error)

ParseGetNetworkResponse parses an HTTP response from a GetNetworkWithResponse call

func (GetNetworkResponse) Status

func (r GetNetworkResponse) Status() string

Status returns HTTPResponse.Status

func (GetNetworkResponse) StatusCode

func (r GetNetworkResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetNetworksResponse

type GetNetworksResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Network
}

func ParseGetNetworksResponse

func ParseGetNetworksResponse(rsp *http.Response) (*GetNetworksResponse, error)

ParseGetNetworksResponse parses an HTTP response from a GetNetworksWithResponse call

func (GetNetworksResponse) Status

func (r GetNetworksResponse) Status() string

Status returns HTTPResponse.Status

func (GetNetworksResponse) StatusCode

func (r GetNetworksResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPeerResponse

type GetPeerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Peer
}

func ParseGetPeerResponse

func ParseGetPeerResponse(rsp *http.Response) (*GetPeerResponse, error)

ParseGetPeerResponse parses an HTTP response from a GetPeerWithResponse call

func (GetPeerResponse) Status

func (r GetPeerResponse) Status() string

Status returns HTTPResponse.Status

func (GetPeerResponse) StatusCode

func (r GetPeerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPeersResponse

type GetPeersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Peer
}

func ParseGetPeersResponse

func ParseGetPeersResponse(rsp *http.Response) (*GetPeersResponse, error)

ParseGetPeersResponse parses an HTTP response from a GetPeersWithResponse call

func (GetPeersResponse) Status

func (r GetPeersResponse) Status() string

Status returns HTTPResponse.Status

func (GetPeersResponse) StatusCode

func (r GetPeersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetStatusResponse

type GetStatusResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Status
}

func ParseGetStatusResponse

func ParseGetStatusResponse(rsp *http.Response) (*GetStatusResponse, error)

ParseGetStatusResponse parses an HTTP response from a GetStatusWithResponse call

func (GetStatusResponse) Status

func (r GetStatusResponse) Status() string

Status returns HTTPResponse.Status

func (GetStatusResponse) StatusCode

func (r GetStatusResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Network

type Network struct {
	// Embedded fields due to inline allOf schema
	// Let ZeroTier modify the system's DNS settings.
	// Embedded fields due to inline allOf schema
	// Let ZeroTier modify the system's DNS settings.
	AllowDNS *bool `json:"allowDNS,omitempty"`

	// Let ZeroTier modify the system's default route.
	AllowDefault *bool `json:"allowDefault,omitempty"`

	// Let ZeroTier manage IP addresses and Route assignments that aren't in private ranges (rfc1918).
	AllowGlobal *bool `json:"allowGlobal,omitempty"`

	// Let ZeroTier to manage IP addresses and Route assignments.
	AllowManaged      *bool     `json:"allowManaged,omitempty"`
	AssignedAddresses *[]string `json:"assignedAddresses,omitempty"`
	Bridge            *bool     `json:"bridge,omitempty"`
	BroadcastEnabled  *bool     `json:"broadcastEnabled,omitempty"`
	Dns               *struct {
		Domain  *string   `json:"domain,omitempty"`
		Servers *[]string `json:"servers,omitempty"`
	} `json:"dns,omitempty"`
	Id *string `json:"id,omitempty"`

	// MAC address for this network's interface.
	Mac                    *string `json:"mac,omitempty"`
	Mtu                    *int    `json:"mtu,omitempty"`
	MulticastSubscriptions *[]struct {
		Adi *int64  `json:"adi,omitempty"`
		Mac *string `json:"mac,omitempty"`
	} `json:"multicastSubscriptions,omitempty"`
	Name            *string `json:"name,omitempty"`
	NetconfRevision *int    `json:"netconfRevision,omitempty"`
	PortDeviceName  *string `json:"portDeviceName,omitempty"`
	PortError       *int    `json:"portError,omitempty"`
	Routes          *[]struct {
		Flags  *int    `json:"flags,omitempty"`
		Metric *int    `json:"metric,omitempty"`
		Target *string `json:"target,omitempty"`
		Via    *string `json:"via,omitempty"`
	} `json:"routes,omitempty"`
	Status *string `json:"status,omitempty"`
	Type   *string `json:"type,omitempty"`
}

Network defines model for Network.

type Peer

type Peer struct {
	Address  *string `json:"address,omitempty"`
	IsBonded *bool   `json:"isBonded,omitempty"`
	Latency  *int    `json:"latency,omitempty"`
	Paths    *[]struct {
		Active        *bool   `json:"active,omitempty"`
		Address       *string `json:"address,omitempty"`
		Expired       *bool   `json:"expired,omitempty"`
		LastReceive   *int64  `json:"lastReceive,omitempty"`
		LastSend      *int64  `json:"lastSend,omitempty"`
		Preferred     *bool   `json:"preferred,omitempty"`
		TrustedPathId *int    `json:"trustedPathId,omitempty"`
	} `json:"paths,omitempty"`
	Role         *string `json:"role,omitempty"`
	Version      *string `json:"version,omitempty"`
	VersionMajor *int    `json:"versionMajor,omitempty"`
	VersionMinor *int    `json:"versionMinor,omitempty"`
	VersionRev   *int    `json:"versionRev,omitempty"`
}

Peer defines model for Peer.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type SetControllerNetworkJSONBody

type SetControllerNetworkJSONBody ControllerNetwork

SetControllerNetworkJSONBody defines parameters for SetControllerNetwork.

type SetControllerNetworkJSONRequestBody

type SetControllerNetworkJSONRequestBody SetControllerNetworkJSONBody

SetControllerNetworkJSONRequestBody defines body for SetControllerNetwork for application/json ContentType.

type SetControllerNetworkResponse

type SetControllerNetworkResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ControllerNetwork
}

func ParseSetControllerNetworkResponse

func ParseSetControllerNetworkResponse(rsp *http.Response) (*SetControllerNetworkResponse, error)

ParseSetControllerNetworkResponse parses an HTTP response from a SetControllerNetworkWithResponse call

func (SetControllerNetworkResponse) Status

Status returns HTTPResponse.Status

func (SetControllerNetworkResponse) StatusCode

func (r SetControllerNetworkResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Status

type Status struct {
	Address *string `json:"address,omitempty"`
	Clock   *int64  `json:"clock,omitempty"`
	Config  *struct {
		Settings *struct {
			AllowTcpFallbackRelay *bool `json:"allowTcpFallbackRelay,omitempty"`
			PortMappingEnabled    *bool `json:"portMappingEnabled,omitempty"`
			PrimaryPort           *int  `json:"primaryPort,omitempty"`
		} `json:"settings,omitempty"`
	} `json:"config,omitempty"`
	Online               *bool   `json:"online,omitempty"`
	PlanetWorldId        *int64  `json:"planetWorldId,omitempty"`
	PlanetWorldTimestamp *int64  `json:"planetWorldTimestamp,omitempty"`
	PublicIdentity       *string `json:"publicIdentity,omitempty"`
	TcpFallbackActive    *bool   `json:"tcpFallbackActive,omitempty"`
	Version              *string `json:"version,omitempty"`
	VersionBuild         *int    `json:"versionBuild,omitempty"`
	VersionMajor         *int    `json:"versionMajor,omitempty"`
	VersionMinor         *int    `json:"versionMinor,omitempty"`
	VersionRev           *int    `json:"versionRev,omitempty"`
}

Status defines model for Status.

type UpdateNetworkJSONBody

type UpdateNetworkJSONBody Network

UpdateNetworkJSONBody defines parameters for UpdateNetwork.

type UpdateNetworkJSONRequestBody

type UpdateNetworkJSONRequestBody UpdateNetworkJSONBody

UpdateNetworkJSONRequestBody defines body for UpdateNetwork for application/json ContentType.

type UpdateNetworkResponse

type UpdateNetworkResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Network
}

func ParseUpdateNetworkResponse

func ParseUpdateNetworkResponse(rsp *http.Response) (*UpdateNetworkResponse, error)

ParseUpdateNetworkResponse parses an HTTP response from a UpdateNetworkWithResponse call

func (UpdateNetworkResponse) Status

func (r UpdateNetworkResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateNetworkResponse) StatusCode

func (r UpdateNetworkResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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