texit

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type Client

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

Client implements OAS client.

func NewClient

func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) DeprovisionNode

func (c *Client) DeprovisionNode(ctx context.Context, params DeprovisionNodeParams) (DeprovisionNodeRes, error)

DeprovisionNode invokes DeprovisionNode operation.

Deprovision the target node.

DELETE /node/{identifier}

func (*Client) DescribeNode

func (c *Client) DescribeNode(ctx context.Context, params DescribeNodeParams) (DescribeNodeRes, error)

DescribeNode invokes DescribeNode operation.

Get the summary of an node.

GET /node/{identifier}

func (*Client) DescribeProvider

func (c *Client) DescribeProvider(ctx context.Context, params DescribeProviderParams) (DescribeProviderRes, error)

DescribeProvider invokes DescribeProvider operation.

Get the summary of a provider.

GET /provider/{name}

func (*Client) DescribeTailnet

func (c *Client) DescribeTailnet(ctx context.Context, params DescribeTailnetParams) (DescribeTailnetRes, error)

DescribeTailnet invokes DescribeTailnet operation.

Get the summary of a provider.

GET /tailnet/{name}

func (*Client) GetExecution

func (c *Client) GetExecution(ctx context.Context, params GetExecutionParams) (GetExecutionRes, error)

GetExecution invokes GetExecution operation.

Get the summary of an execution.

GET /execution/{identifier}

func (*Client) GetNodeStatus

func (c *Client) GetNodeStatus(ctx context.Context, params GetNodeStatusParams) (GetNodeStatusRes, error)

GetNodeStatus invokes GetNodeStatus operation.

Get the status of an node.

GET /node/{identifier}/status

func (*Client) Health

func (c *Client) Health(ctx context.Context) (*HealthResponseContent, error)

Health invokes Health operation.

GET /health

func (*Client) ListNodes

func (c *Client) ListNodes(ctx context.Context) (*ListNodesResponseContent, error)

ListNodes invokes ListNodes operation.

Lists all known nodes.

GET /node

func (*Client) ListNotifiers added in v0.0.10

func (c *Client) ListNotifiers(ctx context.Context) (*ListNotifiersResponseContent, error)

ListNotifiers invokes ListNotifiers operation.

List all registered notifiers.

GET /notifier

func (*Client) ListProviders

func (c *Client) ListProviders(ctx context.Context) (*ListProvidersResponseContent, error)

ListProviders invokes ListProviders operation.

List all registered providers.

GET /provider

func (*Client) ListTailnets

func (c *Client) ListTailnets(ctx context.Context) (*ListTailnetsResponseContent, error)

ListTailnets invokes ListTailnets operation.

List all registered tailnets.

GET /tailnet

func (*Client) ProvisionNode

func (c *Client) ProvisionNode(ctx context.Context, request *ProvisionNodeRequestContent) (ProvisionNodeRes, error)

ProvisionNode invokes ProvisionNode operation.

Provision a node on the specified provider in a given location on the specified tailnet.

POST /node

func (*Client) StartNode

func (c *Client) StartNode(ctx context.Context, params StartNodeParams) (StartNodeRes, error)

StartNode invokes StartNode operation.

Starts the target node.

POST /node/{identifier}/start

func (*Client) StopNode

func (c *Client) StopNode(ctx context.Context, params StopNodeParams) (StopNodeRes, error)

StopNode invokes StopNode operation.

Stops the target node.

POST /node/{identifier}/stop

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type DeprovisionNodeParams

type DeprovisionNodeParams struct {
	// A node's identifier.
	Identifier string
}

DeprovisionNodeParams is parameters of DeprovisionNode operation.

type DeprovisionNodeRes

type DeprovisionNodeRes interface {
	// contains filtered or unexported methods
}

type DeprovisionNodeResponseContent

type DeprovisionNodeResponseContent struct {
	// A node's identifier.
	Execution string `json:"execution"`
}

Ref: #/components/schemas/DeprovisionNodeResponseContent

func (*DeprovisionNodeResponseContent) Decode

Decode decodes DeprovisionNodeResponseContent from json.

func (*DeprovisionNodeResponseContent) Encode

Encode implements json.Marshaler.

func (*DeprovisionNodeResponseContent) GetExecution

func (s *DeprovisionNodeResponseContent) GetExecution() string

GetExecution returns the value of Execution.

func (*DeprovisionNodeResponseContent) MarshalJSON

func (s *DeprovisionNodeResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeprovisionNodeResponseContent) SetExecution

func (s *DeprovisionNodeResponseContent) SetExecution(val string)

SetExecution sets the value of Execution.

func (*DeprovisionNodeResponseContent) UnmarshalJSON

func (s *DeprovisionNodeResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*DeprovisionNodeResponseContent) Validate

func (s *DeprovisionNodeResponseContent) Validate() error

type DescribeNodeParams

type DescribeNodeParams struct {
	// A node's identifier.
	Identifier string
}

DescribeNodeParams is parameters of DescribeNode operation.

type DescribeNodeRes

type DescribeNodeRes interface {
	// contains filtered or unexported methods
}

type DescribeNodeResponseContent

type DescribeNodeResponseContent struct {
	Summary NodeSummary `json:"summary"`
}

Ref: #/components/schemas/DescribeNodeResponseContent

func (*DescribeNodeResponseContent) Decode

Decode decodes DescribeNodeResponseContent from json.

func (*DescribeNodeResponseContent) Encode

func (s *DescribeNodeResponseContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DescribeNodeResponseContent) GetSummary

func (s *DescribeNodeResponseContent) GetSummary() NodeSummary

GetSummary returns the value of Summary.

func (*DescribeNodeResponseContent) MarshalJSON

func (s *DescribeNodeResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DescribeNodeResponseContent) SetSummary

func (s *DescribeNodeResponseContent) SetSummary(val NodeSummary)

SetSummary sets the value of Summary.

func (*DescribeNodeResponseContent) UnmarshalJSON

func (s *DescribeNodeResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*DescribeNodeResponseContent) Validate

func (s *DescribeNodeResponseContent) Validate() error

type DescribeProviderParams

type DescribeProviderParams struct {
	// The name of the provider.
	Name string
}

DescribeProviderParams is parameters of DescribeProvider operation.

type DescribeProviderRes

type DescribeProviderRes interface {
	// contains filtered or unexported methods
}

type DescribeProviderResponseContent

type DescribeProviderResponseContent struct {
	Summary ProviderSummary `json:"summary"`
}

Ref: #/components/schemas/DescribeProviderResponseContent

func (*DescribeProviderResponseContent) Decode

Decode decodes DescribeProviderResponseContent from json.

func (*DescribeProviderResponseContent) Encode

Encode implements json.Marshaler.

func (*DescribeProviderResponseContent) GetSummary

GetSummary returns the value of Summary.

func (*DescribeProviderResponseContent) MarshalJSON

func (s *DescribeProviderResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DescribeProviderResponseContent) SetSummary

SetSummary sets the value of Summary.

func (*DescribeProviderResponseContent) UnmarshalJSON

func (s *DescribeProviderResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*DescribeProviderResponseContent) Validate

func (s *DescribeProviderResponseContent) Validate() error

type DescribeTailnetParams

type DescribeTailnetParams struct {
	// .
	Name string
}

DescribeTailnetParams is parameters of DescribeTailnet operation.

type DescribeTailnetRes

type DescribeTailnetRes interface {
	// contains filtered or unexported methods
}

type DescribeTailnetResponseContent

type DescribeTailnetResponseContent struct {
	Summary TailnetSummary `json:"summary"`
}

Ref: #/components/schemas/DescribeTailnetResponseContent

func (*DescribeTailnetResponseContent) Decode

Decode decodes DescribeTailnetResponseContent from json.

func (*DescribeTailnetResponseContent) Encode

Encode implements json.Marshaler.

func (*DescribeTailnetResponseContent) GetSummary

GetSummary returns the value of Summary.

func (*DescribeTailnetResponseContent) MarshalJSON

func (s *DescribeTailnetResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DescribeTailnetResponseContent) SetSummary

SetSummary sets the value of Summary.

func (*DescribeTailnetResponseContent) UnmarshalJSON

func (s *DescribeTailnetResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*DescribeTailnetResponseContent) Validate

func (s *DescribeTailnetResponseContent) Validate() error

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type ExecutionStatus

type ExecutionStatus string

The status of an execution. Ref: #/components/schemas/ExecutionStatus

const (
	ExecutionStatusPending   ExecutionStatus = "pending"
	ExecutionStatusRunning   ExecutionStatus = "running"
	ExecutionStatusCompleted ExecutionStatus = "completed"
	ExecutionStatusFailed    ExecutionStatus = "failed"
	ExecutionStatusUnknown   ExecutionStatus = "unknown"
)

func (ExecutionStatus) AllValues

func (ExecutionStatus) AllValues() []ExecutionStatus

AllValues returns all ExecutionStatus values.

func (*ExecutionStatus) Decode

func (s *ExecutionStatus) Decode(d *jx.Decoder) error

Decode decodes ExecutionStatus from json.

func (ExecutionStatus) Encode

func (s ExecutionStatus) Encode(e *jx.Encoder)

Encode encodes ExecutionStatus as json.

func (ExecutionStatus) MarshalJSON

func (s ExecutionStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (ExecutionStatus) MarshalText

func (s ExecutionStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*ExecutionStatus) UnmarshalJSON

func (s *ExecutionStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ExecutionStatus) UnmarshalText

func (s *ExecutionStatus) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (ExecutionStatus) Validate

func (s ExecutionStatus) Validate() error

type ExecutionSummary

type ExecutionSummary struct {
	// A node's identifier.
	Identifier string          `json:"identifier"`
	Status     ExecutionStatus `json:"status"`
	Workflow   WorkflowName    `json:"workflow"`
	StartedAt  float64         `json:"startedAt"`
	EndedAt    OptFloat64      `json:"endedAt"`
	Result     OptString       `json:"result"`
}

Ref: #/components/schemas/ExecutionSummary

func (*ExecutionSummary) Decode

func (s *ExecutionSummary) Decode(d *jx.Decoder) error

Decode decodes ExecutionSummary from json.

func (*ExecutionSummary) Encode

func (s *ExecutionSummary) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ExecutionSummary) GetEndedAt

func (s *ExecutionSummary) GetEndedAt() OptFloat64

GetEndedAt returns the value of EndedAt.

func (*ExecutionSummary) GetIdentifier

func (s *ExecutionSummary) GetIdentifier() string

GetIdentifier returns the value of Identifier.

func (*ExecutionSummary) GetResult

func (s *ExecutionSummary) GetResult() OptString

GetResult returns the value of Result.

func (*ExecutionSummary) GetStartedAt

func (s *ExecutionSummary) GetStartedAt() float64

GetStartedAt returns the value of StartedAt.

func (*ExecutionSummary) GetStatus

func (s *ExecutionSummary) GetStatus() ExecutionStatus

GetStatus returns the value of Status.

func (*ExecutionSummary) GetWorkflow

func (s *ExecutionSummary) GetWorkflow() WorkflowName

GetWorkflow returns the value of Workflow.

func (*ExecutionSummary) MarshalJSON

func (s *ExecutionSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ExecutionSummary) SetEndedAt

func (s *ExecutionSummary) SetEndedAt(val OptFloat64)

SetEndedAt sets the value of EndedAt.

func (*ExecutionSummary) SetIdentifier

func (s *ExecutionSummary) SetIdentifier(val string)

SetIdentifier sets the value of Identifier.

func (*ExecutionSummary) SetResult

func (s *ExecutionSummary) SetResult(val OptString)

SetResult sets the value of Result.

func (*ExecutionSummary) SetStartedAt

func (s *ExecutionSummary) SetStartedAt(val float64)

SetStartedAt sets the value of StartedAt.

func (*ExecutionSummary) SetStatus

func (s *ExecutionSummary) SetStatus(val ExecutionStatus)

SetStatus sets the value of Status.

func (*ExecutionSummary) SetWorkflow

func (s *ExecutionSummary) SetWorkflow(val WorkflowName)

SetWorkflow sets the value of Workflow.

func (*ExecutionSummary) UnmarshalJSON

func (s *ExecutionSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ExecutionSummary) Validate

func (s *ExecutionSummary) Validate() error

type GetExecutionParams

type GetExecutionParams struct {
	// A node's identifier.
	Identifier string
}

GetExecutionParams is parameters of GetExecution operation.

type GetExecutionRes

type GetExecutionRes interface {
	// contains filtered or unexported methods
}

type GetExecutionResponseContent

type GetExecutionResponseContent struct {
	Summary ExecutionSummary `json:"summary"`
}

Ref: #/components/schemas/GetExecutionResponseContent

func (*GetExecutionResponseContent) Decode

Decode decodes GetExecutionResponseContent from json.

func (*GetExecutionResponseContent) Encode

func (s *GetExecutionResponseContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetExecutionResponseContent) GetSummary

GetSummary returns the value of Summary.

func (*GetExecutionResponseContent) MarshalJSON

func (s *GetExecutionResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetExecutionResponseContent) SetSummary

func (s *GetExecutionResponseContent) SetSummary(val ExecutionSummary)

SetSummary sets the value of Summary.

func (*GetExecutionResponseContent) UnmarshalJSON

func (s *GetExecutionResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GetExecutionResponseContent) Validate

func (s *GetExecutionResponseContent) Validate() error

type GetNodeStatusParams

type GetNodeStatusParams struct {
	// A node's identifier.
	Identifier string
}

GetNodeStatusParams is parameters of GetNodeStatus operation.

type GetNodeStatusRes

type GetNodeStatusRes interface {
	// contains filtered or unexported methods
}

type GetNodeStatusResponseContent

type GetNodeStatusResponseContent struct {
	Status NodeStatus `json:"status"`
}

Ref: #/components/schemas/GetNodeStatusResponseContent

func (*GetNodeStatusResponseContent) Decode

Decode decodes GetNodeStatusResponseContent from json.

func (*GetNodeStatusResponseContent) Encode

func (s *GetNodeStatusResponseContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetNodeStatusResponseContent) GetStatus

GetStatus returns the value of Status.

func (*GetNodeStatusResponseContent) MarshalJSON

func (s *GetNodeStatusResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetNodeStatusResponseContent) SetStatus

func (s *GetNodeStatusResponseContent) SetStatus(val NodeStatus)

SetStatus sets the value of Status.

func (*GetNodeStatusResponseContent) UnmarshalJSON

func (s *GetNodeStatusResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GetNodeStatusResponseContent) Validate

func (s *GetNodeStatusResponseContent) Validate() error

type Handler

type Handler interface {
	// DeprovisionNode implements DeprovisionNode operation.
	//
	// Deprovision the target node.
	//
	// DELETE /node/{identifier}
	DeprovisionNode(ctx context.Context, params DeprovisionNodeParams) (DeprovisionNodeRes, error)
	// DescribeNode implements DescribeNode operation.
	//
	// Get the summary of an node.
	//
	// GET /node/{identifier}
	DescribeNode(ctx context.Context, params DescribeNodeParams) (DescribeNodeRes, error)
	// DescribeProvider implements DescribeProvider operation.
	//
	// Get the summary of a provider.
	//
	// GET /provider/{name}
	DescribeProvider(ctx context.Context, params DescribeProviderParams) (DescribeProviderRes, error)
	// DescribeTailnet implements DescribeTailnet operation.
	//
	// Get the summary of a provider.
	//
	// GET /tailnet/{name}
	DescribeTailnet(ctx context.Context, params DescribeTailnetParams) (DescribeTailnetRes, error)
	// GetExecution implements GetExecution operation.
	//
	// Get the summary of an execution.
	//
	// GET /execution/{identifier}
	GetExecution(ctx context.Context, params GetExecutionParams) (GetExecutionRes, error)
	// GetNodeStatus implements GetNodeStatus operation.
	//
	// Get the status of an node.
	//
	// GET /node/{identifier}/status
	GetNodeStatus(ctx context.Context, params GetNodeStatusParams) (GetNodeStatusRes, error)
	// Health implements Health operation.
	//
	// GET /health
	Health(ctx context.Context) (*HealthResponseContent, error)
	// ListNodes implements ListNodes operation.
	//
	// Lists all known nodes.
	//
	// GET /node
	ListNodes(ctx context.Context) (*ListNodesResponseContent, error)
	// ListNotifiers implements ListNotifiers operation.
	//
	// List all registered notifiers.
	//
	// GET /notifier
	ListNotifiers(ctx context.Context) (*ListNotifiersResponseContent, error)
	// ListProviders implements ListProviders operation.
	//
	// List all registered providers.
	//
	// GET /provider
	ListProviders(ctx context.Context) (*ListProvidersResponseContent, error)
	// ListTailnets implements ListTailnets operation.
	//
	// List all registered tailnets.
	//
	// GET /tailnet
	ListTailnets(ctx context.Context) (*ListTailnetsResponseContent, error)
	// ProvisionNode implements ProvisionNode operation.
	//
	// Provision a node on the specified provider in a given location on the specified tailnet.
	//
	// POST /node
	ProvisionNode(ctx context.Context, req *ProvisionNodeRequestContent) (ProvisionNodeRes, error)
	// StartNode implements StartNode operation.
	//
	// Starts the target node.
	//
	// POST /node/{identifier}/start
	StartNode(ctx context.Context, params StartNodeParams) (StartNodeRes, error)
	// StopNode implements StopNode operation.
	//
	// Stops the target node.
	//
	// POST /node/{identifier}/stop
	StopNode(ctx context.Context, params StopNodeParams) (StopNodeRes, error)
}

Handler handles operations described by OpenAPI v3 specification.

type HealthResponseContent

type HealthResponseContent struct {
	Healthy bool `json:"healthy"`
}

Ref: #/components/schemas/HealthResponseContent

func (*HealthResponseContent) Decode

func (s *HealthResponseContent) Decode(d *jx.Decoder) error

Decode decodes HealthResponseContent from json.

func (*HealthResponseContent) Encode

func (s *HealthResponseContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*HealthResponseContent) GetHealthy

func (s *HealthResponseContent) GetHealthy() bool

GetHealthy returns the value of Healthy.

func (*HealthResponseContent) MarshalJSON

func (s *HealthResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*HealthResponseContent) SetHealthy

func (s *HealthResponseContent) SetHealthy(val bool)

SetHealthy sets the value of Healthy.

func (*HealthResponseContent) UnmarshalJSON

func (s *HealthResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type InvalidInputErrorResponseContent

type InvalidInputErrorResponseContent struct {
	Message string `json:"message"`
}

Ref: #/components/schemas/InvalidInputErrorResponseContent

func (*InvalidInputErrorResponseContent) Decode

Decode decodes InvalidInputErrorResponseContent from json.

func (*InvalidInputErrorResponseContent) Encode

Encode implements json.Marshaler.

func (*InvalidInputErrorResponseContent) GetMessage

func (s *InvalidInputErrorResponseContent) GetMessage() string

GetMessage returns the value of Message.

func (*InvalidInputErrorResponseContent) MarshalJSON

func (s *InvalidInputErrorResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InvalidInputErrorResponseContent) SetMessage

func (s *InvalidInputErrorResponseContent) SetMessage(val string)

SetMessage sets the value of Message.

func (*InvalidInputErrorResponseContent) UnmarshalJSON

func (s *InvalidInputErrorResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Invoker

type Invoker interface {
	// DeprovisionNode invokes DeprovisionNode operation.
	//
	// Deprovision the target node.
	//
	// DELETE /node/{identifier}
	DeprovisionNode(ctx context.Context, params DeprovisionNodeParams) (DeprovisionNodeRes, error)
	// DescribeNode invokes DescribeNode operation.
	//
	// Get the summary of an node.
	//
	// GET /node/{identifier}
	DescribeNode(ctx context.Context, params DescribeNodeParams) (DescribeNodeRes, error)
	// DescribeProvider invokes DescribeProvider operation.
	//
	// Get the summary of a provider.
	//
	// GET /provider/{name}
	DescribeProvider(ctx context.Context, params DescribeProviderParams) (DescribeProviderRes, error)
	// DescribeTailnet invokes DescribeTailnet operation.
	//
	// Get the summary of a provider.
	//
	// GET /tailnet/{name}
	DescribeTailnet(ctx context.Context, params DescribeTailnetParams) (DescribeTailnetRes, error)
	// GetExecution invokes GetExecution operation.
	//
	// Get the summary of an execution.
	//
	// GET /execution/{identifier}
	GetExecution(ctx context.Context, params GetExecutionParams) (GetExecutionRes, error)
	// GetNodeStatus invokes GetNodeStatus operation.
	//
	// Get the status of an node.
	//
	// GET /node/{identifier}/status
	GetNodeStatus(ctx context.Context, params GetNodeStatusParams) (GetNodeStatusRes, error)
	// Health invokes Health operation.
	//
	// GET /health
	Health(ctx context.Context) (*HealthResponseContent, error)
	// ListNodes invokes ListNodes operation.
	//
	// Lists all known nodes.
	//
	// GET /node
	ListNodes(ctx context.Context) (*ListNodesResponseContent, error)
	// ListNotifiers invokes ListNotifiers operation.
	//
	// List all registered notifiers.
	//
	// GET /notifier
	ListNotifiers(ctx context.Context) (*ListNotifiersResponseContent, error)
	// ListProviders invokes ListProviders operation.
	//
	// List all registered providers.
	//
	// GET /provider
	ListProviders(ctx context.Context) (*ListProvidersResponseContent, error)
	// ListTailnets invokes ListTailnets operation.
	//
	// List all registered tailnets.
	//
	// GET /tailnet
	ListTailnets(ctx context.Context) (*ListTailnetsResponseContent, error)
	// ProvisionNode invokes ProvisionNode operation.
	//
	// Provision a node on the specified provider in a given location on the specified tailnet.
	//
	// POST /node
	ProvisionNode(ctx context.Context, request *ProvisionNodeRequestContent) (ProvisionNodeRes, error)
	// StartNode invokes StartNode operation.
	//
	// Starts the target node.
	//
	// POST /node/{identifier}/start
	StartNode(ctx context.Context, params StartNodeParams) (StartNodeRes, error)
	// StopNode invokes StopNode operation.
	//
	// Stops the target node.
	//
	// POST /node/{identifier}/stop
	StopNode(ctx context.Context, params StopNodeParams) (StopNodeRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type ListNodesResponseContent

type ListNodesResponseContent struct {
	Summaries []NodeSummary `json:"summaries"`
}

Ref: #/components/schemas/ListNodesResponseContent

func (*ListNodesResponseContent) Decode

func (s *ListNodesResponseContent) Decode(d *jx.Decoder) error

Decode decodes ListNodesResponseContent from json.

func (*ListNodesResponseContent) Encode

func (s *ListNodesResponseContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ListNodesResponseContent) GetSummaries

func (s *ListNodesResponseContent) GetSummaries() []NodeSummary

GetSummaries returns the value of Summaries.

func (*ListNodesResponseContent) MarshalJSON

func (s *ListNodesResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListNodesResponseContent) SetSummaries

func (s *ListNodesResponseContent) SetSummaries(val []NodeSummary)

SetSummaries sets the value of Summaries.

func (*ListNodesResponseContent) UnmarshalJSON

func (s *ListNodesResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ListNodesResponseContent) Validate

func (s *ListNodesResponseContent) Validate() error

type ListNotifiersResponseContent added in v0.0.10

type ListNotifiersResponseContent struct {
	Summaries []NotifierSummary `json:"summaries"`
}

Ref: #/components/schemas/ListNotifiersResponseContent

func (*ListNotifiersResponseContent) Decode added in v0.0.10

Decode decodes ListNotifiersResponseContent from json.

func (*ListNotifiersResponseContent) Encode added in v0.0.10

func (s *ListNotifiersResponseContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ListNotifiersResponseContent) GetSummaries added in v0.0.10

func (s *ListNotifiersResponseContent) GetSummaries() []NotifierSummary

GetSummaries returns the value of Summaries.

func (*ListNotifiersResponseContent) MarshalJSON added in v0.0.10

func (s *ListNotifiersResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListNotifiersResponseContent) SetSummaries added in v0.0.10

func (s *ListNotifiersResponseContent) SetSummaries(val []NotifierSummary)

SetSummaries sets the value of Summaries.

func (*ListNotifiersResponseContent) UnmarshalJSON added in v0.0.10

func (s *ListNotifiersResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ListNotifiersResponseContent) Validate added in v0.0.10

func (s *ListNotifiersResponseContent) Validate() error

type ListProvidersResponseContent

type ListProvidersResponseContent struct {
	Summaries []ProviderSummary `json:"summaries"`
}

Ref: #/components/schemas/ListProvidersResponseContent

func (*ListProvidersResponseContent) Decode

Decode decodes ListProvidersResponseContent from json.

func (*ListProvidersResponseContent) Encode

func (s *ListProvidersResponseContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ListProvidersResponseContent) GetSummaries

func (s *ListProvidersResponseContent) GetSummaries() []ProviderSummary

GetSummaries returns the value of Summaries.

func (*ListProvidersResponseContent) MarshalJSON

func (s *ListProvidersResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListProvidersResponseContent) SetSummaries

func (s *ListProvidersResponseContent) SetSummaries(val []ProviderSummary)

SetSummaries sets the value of Summaries.

func (*ListProvidersResponseContent) UnmarshalJSON

func (s *ListProvidersResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ListProvidersResponseContent) Validate

func (s *ListProvidersResponseContent) Validate() error

type ListTailnetsResponseContent

type ListTailnetsResponseContent struct {
	Summaries []TailnetSummary `json:"summaries"`
}

Ref: #/components/schemas/ListTailnetsResponseContent

func (*ListTailnetsResponseContent) Decode

Decode decodes ListTailnetsResponseContent from json.

func (*ListTailnetsResponseContent) Encode

func (s *ListTailnetsResponseContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ListTailnetsResponseContent) GetSummaries

func (s *ListTailnetsResponseContent) GetSummaries() []TailnetSummary

GetSummaries returns the value of Summaries.

func (*ListTailnetsResponseContent) MarshalJSON

func (s *ListTailnetsResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListTailnetsResponseContent) SetSummaries

func (s *ListTailnetsResponseContent) SetSummaries(val []TailnetSummary)

SetSummaries sets the value of Summaries.

func (*ListTailnetsResponseContent) UnmarshalJSON

func (s *ListTailnetsResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ListTailnetsResponseContent) Validate

func (s *ListTailnetsResponseContent) Validate() error

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type NodeStatus

type NodeStatus string

The status of a node. Ref: #/components/schemas/NodeStatus

const (
	NodeStatusStarting NodeStatus = "starting"
	NodeStatusRunning  NodeStatus = "running"
	NodeStatusStopping NodeStatus = "stopping"
	NodeStatusStopped  NodeStatus = "stopped"
	NodeStatusUnknown  NodeStatus = "unknown"
)

func (NodeStatus) AllValues

func (NodeStatus) AllValues() []NodeStatus

AllValues returns all NodeStatus values.

func (*NodeStatus) Decode

func (s *NodeStatus) Decode(d *jx.Decoder) error

Decode decodes NodeStatus from json.

func (NodeStatus) Encode

func (s NodeStatus) Encode(e *jx.Encoder)

Encode encodes NodeStatus as json.

func (NodeStatus) MarshalJSON

func (s NodeStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (NodeStatus) MarshalText

func (s NodeStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*NodeStatus) UnmarshalJSON

func (s *NodeStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*NodeStatus) UnmarshalText

func (s *NodeStatus) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (NodeStatus) Validate

func (s NodeStatus) Validate() error

type NodeSummary

type NodeSummary struct {
	// A node's identifier.
	Identifier string `json:"identifier"`
	// The name of the provider.
	Provider string `json:"provider"`
	// A location provided by a provider.
	Location string `json:"location"`
	// The identifier of the node resource in the provider.
	ProviderNodeIdentifier string `json:"providerNodeIdentifier"`
	// .
	Tailnet string `json:"tailnet"`
	// The name of a tailnet device.
	TailnetDeviceName string `json:"tailnetDeviceName"`
	// The identifier of a tailnet device.
	TailnetDeviceIdentifier string `json:"TailnetDeviceIdentifier"`
	// If a node is ephemeral.
	Ephemeral bool `json:"ephemeral"`
	// When a node was created.
	Created float64 `json:"created"`
	// When a node was last updated.
	Updated float64 `json:"updated"`
}

Ref: #/components/schemas/NodeSummary

func (*NodeSummary) Decode

func (s *NodeSummary) Decode(d *jx.Decoder) error

Decode decodes NodeSummary from json.

func (*NodeSummary) Encode

func (s *NodeSummary) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*NodeSummary) GetCreated

func (s *NodeSummary) GetCreated() float64

GetCreated returns the value of Created.

func (*NodeSummary) GetEphemeral

func (s *NodeSummary) GetEphemeral() bool

GetEphemeral returns the value of Ephemeral.

func (*NodeSummary) GetIdentifier

func (s *NodeSummary) GetIdentifier() string

GetIdentifier returns the value of Identifier.

func (*NodeSummary) GetLocation

func (s *NodeSummary) GetLocation() string

GetLocation returns the value of Location.

func (*NodeSummary) GetProvider

func (s *NodeSummary) GetProvider() string

GetProvider returns the value of Provider.

func (*NodeSummary) GetProviderNodeIdentifier

func (s *NodeSummary) GetProviderNodeIdentifier() string

GetProviderNodeIdentifier returns the value of ProviderNodeIdentifier.

func (*NodeSummary) GetTailnet

func (s *NodeSummary) GetTailnet() string

GetTailnet returns the value of Tailnet.

func (*NodeSummary) GetTailnetDeviceIdentifier

func (s *NodeSummary) GetTailnetDeviceIdentifier() string

GetTailnetDeviceIdentifier returns the value of TailnetDeviceIdentifier.

func (*NodeSummary) GetTailnetDeviceName

func (s *NodeSummary) GetTailnetDeviceName() string

GetTailnetDeviceName returns the value of TailnetDeviceName.

func (*NodeSummary) GetUpdated

func (s *NodeSummary) GetUpdated() float64

GetUpdated returns the value of Updated.

func (*NodeSummary) MarshalJSON

func (s *NodeSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*NodeSummary) SetCreated

func (s *NodeSummary) SetCreated(val float64)

SetCreated sets the value of Created.

func (*NodeSummary) SetEphemeral

func (s *NodeSummary) SetEphemeral(val bool)

SetEphemeral sets the value of Ephemeral.

func (*NodeSummary) SetIdentifier

func (s *NodeSummary) SetIdentifier(val string)

SetIdentifier sets the value of Identifier.

func (*NodeSummary) SetLocation

func (s *NodeSummary) SetLocation(val string)

SetLocation sets the value of Location.

func (*NodeSummary) SetProvider

func (s *NodeSummary) SetProvider(val string)

SetProvider sets the value of Provider.

func (*NodeSummary) SetProviderNodeIdentifier

func (s *NodeSummary) SetProviderNodeIdentifier(val string)

SetProviderNodeIdentifier sets the value of ProviderNodeIdentifier.

func (*NodeSummary) SetTailnet

func (s *NodeSummary) SetTailnet(val string)

SetTailnet sets the value of Tailnet.

func (*NodeSummary) SetTailnetDeviceIdentifier

func (s *NodeSummary) SetTailnetDeviceIdentifier(val string)

SetTailnetDeviceIdentifier sets the value of TailnetDeviceIdentifier.

func (*NodeSummary) SetTailnetDeviceName

func (s *NodeSummary) SetTailnetDeviceName(val string)

SetTailnetDeviceName sets the value of TailnetDeviceName.

func (*NodeSummary) SetUpdated

func (s *NodeSummary) SetUpdated(val float64)

SetUpdated sets the value of Updated.

func (*NodeSummary) UnmarshalJSON

func (s *NodeSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*NodeSummary) Validate

func (s *NodeSummary) Validate() error

type NotifierSummary added in v0.0.10

type NotifierSummary struct {
	// The name of the notifier.
	Name string       `json:"name"`
	Type NotifierType `json:"type"`
	// The endpoint that is used to send notifications. For SNS, this is the topic arn. For MQTT, this is
	// the broker address and topic.
	Endpoint string `json:"endpoint"`
}

Ref: #/components/schemas/NotifierSummary

func (*NotifierSummary) Decode added in v0.0.10

func (s *NotifierSummary) Decode(d *jx.Decoder) error

Decode decodes NotifierSummary from json.

func (*NotifierSummary) Encode added in v0.0.10

func (s *NotifierSummary) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*NotifierSummary) GetEndpoint added in v0.0.10

func (s *NotifierSummary) GetEndpoint() string

GetEndpoint returns the value of Endpoint.

func (*NotifierSummary) GetName added in v0.0.10

func (s *NotifierSummary) GetName() string

GetName returns the value of Name.

func (*NotifierSummary) GetType added in v0.0.10

func (s *NotifierSummary) GetType() NotifierType

GetType returns the value of Type.

func (*NotifierSummary) MarshalJSON added in v0.0.10

func (s *NotifierSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*NotifierSummary) SetEndpoint added in v0.0.10

func (s *NotifierSummary) SetEndpoint(val string)

SetEndpoint sets the value of Endpoint.

func (*NotifierSummary) SetName added in v0.0.10

func (s *NotifierSummary) SetName(val string)

SetName sets the value of Name.

func (*NotifierSummary) SetType added in v0.0.10

func (s *NotifierSummary) SetType(val NotifierType)

SetType sets the value of Type.

func (*NotifierSummary) UnmarshalJSON added in v0.0.10

func (s *NotifierSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*NotifierSummary) Validate added in v0.0.10

func (s *NotifierSummary) Validate() error

type NotifierType added in v0.0.10

type NotifierType string

The type of notifier. Ref: #/components/schemas/NotifierType

const (
	NotifierTypeAWSSns  NotifierType = "aws-sns"
	NotifierTypeMqtt    NotifierType = "mqtt"
	NotifierTypeUnknown NotifierType = "unknown"
)

func (NotifierType) AllValues added in v0.0.10

func (NotifierType) AllValues() []NotifierType

AllValues returns all NotifierType values.

func (*NotifierType) Decode added in v0.0.10

func (s *NotifierType) Decode(d *jx.Decoder) error

Decode decodes NotifierType from json.

func (NotifierType) Encode added in v0.0.10

func (s NotifierType) Encode(e *jx.Encoder)

Encode encodes NotifierType as json.

func (NotifierType) MarshalJSON added in v0.0.10

func (s NotifierType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (NotifierType) MarshalText added in v0.0.10

func (s NotifierType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*NotifierType) UnmarshalJSON added in v0.0.10

func (s *NotifierType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*NotifierType) UnmarshalText added in v0.0.10

func (s *NotifierType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (NotifierType) Validate added in v0.0.10

func (s NotifierType) Validate() error

type OptBool

type OptBool struct {
	Value bool
	Set   bool
}

OptBool is optional bool.

func NewOptBool

func NewOptBool(v bool) OptBool

NewOptBool returns new OptBool with value set to v.

func (*OptBool) Decode

func (o *OptBool) Decode(d *jx.Decoder) error

Decode decodes bool from json.

func (OptBool) Encode

func (o OptBool) Encode(e *jx.Encoder)

Encode encodes bool as json.

func (OptBool) Get

func (o OptBool) Get() (v bool, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptBool) IsSet

func (o OptBool) IsSet() bool

IsSet returns true if OptBool was set.

func (OptBool) MarshalJSON

func (s OptBool) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptBool) Or

func (o OptBool) Or(d bool) bool

Or returns value if set, or given parameter if does not.

func (*OptBool) Reset

func (o *OptBool) Reset()

Reset unsets value.

func (*OptBool) SetTo

func (o *OptBool) SetTo(v bool)

SetTo sets value to v.

func (*OptBool) UnmarshalJSON

func (s *OptBool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptFloat64

type OptFloat64 struct {
	Value float64
	Set   bool
}

OptFloat64 is optional float64.

func NewOptFloat64

func NewOptFloat64(v float64) OptFloat64

NewOptFloat64 returns new OptFloat64 with value set to v.

func (*OptFloat64) Decode

func (o *OptFloat64) Decode(d *jx.Decoder) error

Decode decodes float64 from json.

func (OptFloat64) Encode

func (o OptFloat64) Encode(e *jx.Encoder)

Encode encodes float64 as json.

func (OptFloat64) Get

func (o OptFloat64) Get() (v float64, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptFloat64) IsSet

func (o OptFloat64) IsSet() bool

IsSet returns true if OptFloat64 was set.

func (OptFloat64) MarshalJSON

func (s OptFloat64) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptFloat64) Or

func (o OptFloat64) Or(d float64) float64

Or returns value if set, or given parameter if does not.

func (*OptFloat64) Reset

func (o *OptFloat64) Reset()

Reset unsets value.

func (*OptFloat64) SetTo

func (o *OptFloat64) SetTo(v float64)

SetTo sets value to v.

func (*OptFloat64) UnmarshalJSON

func (s *OptFloat64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString added in v0.0.3

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString added in v0.0.3

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode added in v0.0.3

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode added in v0.0.3

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get added in v0.0.3

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet added in v0.0.3

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON added in v0.0.3

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or added in v0.0.3

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset added in v0.0.3

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo added in v0.0.3

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON added in v0.0.3

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the otel.GetMeterProvider() is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type ProviderSummary

type ProviderSummary struct {
	// The name of the provider.
	Name string       `json:"name"`
	Type ProviderType `json:"type"`
}

Ref: #/components/schemas/ProviderSummary

func (*ProviderSummary) Decode

func (s *ProviderSummary) Decode(d *jx.Decoder) error

Decode decodes ProviderSummary from json.

func (*ProviderSummary) Encode

func (s *ProviderSummary) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ProviderSummary) GetName

func (s *ProviderSummary) GetName() string

GetName returns the value of Name.

func (*ProviderSummary) GetType

func (s *ProviderSummary) GetType() ProviderType

GetType returns the value of Type.

func (*ProviderSummary) MarshalJSON

func (s *ProviderSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ProviderSummary) SetName

func (s *ProviderSummary) SetName(val string)

SetName sets the value of Name.

func (*ProviderSummary) SetType

func (s *ProviderSummary) SetType(val ProviderType)

SetType sets the value of Type.

func (*ProviderSummary) UnmarshalJSON

func (s *ProviderSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ProviderSummary) Validate

func (s *ProviderSummary) Validate() error

type ProviderType

type ProviderType string

The type of provider. Ref: #/components/schemas/ProviderType

const (
	ProviderTypeAWSEcs  ProviderType = "aws-ecs"
	ProviderTypeAWSEc2  ProviderType = "aws-ec2"
	ProviderTypeLinode  ProviderType = "linode"
	ProviderTypeHetzner ProviderType = "hetzner"
	ProviderTypeUnknown ProviderType = "unknown"
)

func (ProviderType) AllValues

func (ProviderType) AllValues() []ProviderType

AllValues returns all ProviderType values.

func (*ProviderType) Decode

func (s *ProviderType) Decode(d *jx.Decoder) error

Decode decodes ProviderType from json.

func (ProviderType) Encode

func (s ProviderType) Encode(e *jx.Encoder)

Encode encodes ProviderType as json.

func (ProviderType) MarshalJSON

func (s ProviderType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (ProviderType) MarshalText

func (s ProviderType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*ProviderType) UnmarshalJSON

func (s *ProviderType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ProviderType) UnmarshalText

func (s *ProviderType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (ProviderType) Validate

func (s ProviderType) Validate() error

type ProvisionNodeRequestContent

type ProvisionNodeRequestContent struct {
	// The name of the provider.
	Provider string `json:"provider"`
	// A location provided by a provider.
	Location string `json:"location"`
	// .
	Tailnet   string  `json:"tailnet"`
	Ephemeral OptBool `json:"ephemeral"`
}

Ref: #/components/schemas/ProvisionNodeRequestContent

func (*ProvisionNodeRequestContent) Decode

Decode decodes ProvisionNodeRequestContent from json.

func (*ProvisionNodeRequestContent) Encode

func (s *ProvisionNodeRequestContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ProvisionNodeRequestContent) GetEphemeral

func (s *ProvisionNodeRequestContent) GetEphemeral() OptBool

GetEphemeral returns the value of Ephemeral.

func (*ProvisionNodeRequestContent) GetLocation

func (s *ProvisionNodeRequestContent) GetLocation() string

GetLocation returns the value of Location.

func (*ProvisionNodeRequestContent) GetProvider

func (s *ProvisionNodeRequestContent) GetProvider() string

GetProvider returns the value of Provider.

func (*ProvisionNodeRequestContent) GetTailnet

func (s *ProvisionNodeRequestContent) GetTailnet() string

GetTailnet returns the value of Tailnet.

func (*ProvisionNodeRequestContent) MarshalJSON

func (s *ProvisionNodeRequestContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ProvisionNodeRequestContent) SetEphemeral

func (s *ProvisionNodeRequestContent) SetEphemeral(val OptBool)

SetEphemeral sets the value of Ephemeral.

func (*ProvisionNodeRequestContent) SetLocation

func (s *ProvisionNodeRequestContent) SetLocation(val string)

SetLocation sets the value of Location.

func (*ProvisionNodeRequestContent) SetProvider

func (s *ProvisionNodeRequestContent) SetProvider(val string)

SetProvider sets the value of Provider.

func (*ProvisionNodeRequestContent) SetTailnet

func (s *ProvisionNodeRequestContent) SetTailnet(val string)

SetTailnet sets the value of Tailnet.

func (*ProvisionNodeRequestContent) UnmarshalJSON

func (s *ProvisionNodeRequestContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ProvisionNodeRequestContent) Validate

func (s *ProvisionNodeRequestContent) Validate() error

type ProvisionNodeRes

type ProvisionNodeRes interface {
	// contains filtered or unexported methods
}

type ProvisionNodeResponseContent

type ProvisionNodeResponseContent struct {
	// A node's identifier.
	Execution string `json:"execution"`
}

Ref: #/components/schemas/ProvisionNodeResponseContent

func (*ProvisionNodeResponseContent) Decode

Decode decodes ProvisionNodeResponseContent from json.

func (*ProvisionNodeResponseContent) Encode

func (s *ProvisionNodeResponseContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ProvisionNodeResponseContent) GetExecution

func (s *ProvisionNodeResponseContent) GetExecution() string

GetExecution returns the value of Execution.

func (*ProvisionNodeResponseContent) MarshalJSON

func (s *ProvisionNodeResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ProvisionNodeResponseContent) SetExecution

func (s *ProvisionNodeResponseContent) SetExecution(val string)

SetExecution sets the value of Execution.

func (*ProvisionNodeResponseContent) UnmarshalJSON

func (s *ProvisionNodeResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ProvisionNodeResponseContent) Validate

func (s *ProvisionNodeResponseContent) Validate() error

type ResourceNotFoundErrorResponseContent

type ResourceNotFoundErrorResponseContent struct {
	Message string `json:"message"`
}

Ref: #/components/schemas/ResourceNotFoundErrorResponseContent

func (*ResourceNotFoundErrorResponseContent) Decode

Decode decodes ResourceNotFoundErrorResponseContent from json.

func (*ResourceNotFoundErrorResponseContent) Encode

Encode implements json.Marshaler.

func (*ResourceNotFoundErrorResponseContent) GetMessage

GetMessage returns the value of Message.

func (*ResourceNotFoundErrorResponseContent) MarshalJSON

func (s *ResourceNotFoundErrorResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResourceNotFoundErrorResponseContent) SetMessage

func (s *ResourceNotFoundErrorResponseContent) SetMessage(val string)

SetMessage sets the value of Message.

func (*ResourceNotFoundErrorResponseContent) UnmarshalJSON

func (s *ResourceNotFoundErrorResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Route

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

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type SecurityHandler

type SecurityHandler interface {
	// HandleSmithyAPIHttpApiKeyAuth handles smithy.api.httpApiKeyAuth security.
	// API key authentication via the 'X-Api-Key' header.
	HandleSmithyAPIHttpApiKeyAuth(ctx context.Context, operationName string, t SmithyAPIHttpApiKeyAuth) (context.Context, error)
}

SecurityHandler is handler for security parameters.

type SecuritySource

type SecuritySource interface {
	// SmithyAPIHttpApiKeyAuth provides smithy.api.httpApiKeyAuth security value.
	// API key authentication via the 'X-Api-Key' header.
	SmithyAPIHttpApiKeyAuth(ctx context.Context, operationName string) (SmithyAPIHttpApiKeyAuth, error)
}

SecuritySource is provider of security values (tokens, passwords, etc.).

type Server

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

Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.

func NewServer

func NewServer(h Handler, sec SecurityHandler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

ServerOption is server config option.

func WithErrorHandler

func WithErrorHandler(h ErrorHandler) ServerOption

WithErrorHandler specifies error handler to use.

func WithMaxMultipartMemory

func WithMaxMultipartMemory(max int64) ServerOption

WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.

func WithMethodNotAllowed

func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption

WithMethodNotAllowed specifies Method Not Allowed handler to use.

func WithMiddleware

func WithMiddleware(m ...Middleware) ServerOption

WithMiddleware specifies middlewares to use.

func WithNotFound

func WithNotFound(notFound http.HandlerFunc) ServerOption

WithNotFound specifies Not Found handler to use.

func WithPathPrefix

func WithPathPrefix(prefix string) ServerOption

WithPathPrefix specifies server path prefix.

type SmithyAPIHttpApiKeyAuth

type SmithyAPIHttpApiKeyAuth struct {
	APIKey string
}

func (*SmithyAPIHttpApiKeyAuth) GetAPIKey

func (s *SmithyAPIHttpApiKeyAuth) GetAPIKey() string

GetAPIKey returns the value of APIKey.

func (*SmithyAPIHttpApiKeyAuth) SetAPIKey

func (s *SmithyAPIHttpApiKeyAuth) SetAPIKey(val string)

SetAPIKey sets the value of APIKey.

type StartNodeParams

type StartNodeParams struct {
	// A node's identifier.
	Identifier string
}

StartNodeParams is parameters of StartNode operation.

type StartNodeRes

type StartNodeRes interface {
	// contains filtered or unexported methods
}

type StartNodeResponseContent

type StartNodeResponseContent struct {
	Success bool `json:"success"`
}

Ref: #/components/schemas/StartNodeResponseContent

func (*StartNodeResponseContent) Decode

func (s *StartNodeResponseContent) Decode(d *jx.Decoder) error

Decode decodes StartNodeResponseContent from json.

func (*StartNodeResponseContent) Encode

func (s *StartNodeResponseContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*StartNodeResponseContent) GetSuccess

func (s *StartNodeResponseContent) GetSuccess() bool

GetSuccess returns the value of Success.

func (*StartNodeResponseContent) MarshalJSON

func (s *StartNodeResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*StartNodeResponseContent) SetSuccess

func (s *StartNodeResponseContent) SetSuccess(val bool)

SetSuccess sets the value of Success.

func (*StartNodeResponseContent) UnmarshalJSON

func (s *StartNodeResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type StopNodeParams

type StopNodeParams struct {
	// A node's identifier.
	Identifier string
}

StopNodeParams is parameters of StopNode operation.

type StopNodeRes

type StopNodeRes interface {
	// contains filtered or unexported methods
}

type StopNodeResponseContent

type StopNodeResponseContent struct {
	Success bool `json:"success"`
}

Ref: #/components/schemas/StopNodeResponseContent

func (*StopNodeResponseContent) Decode

func (s *StopNodeResponseContent) Decode(d *jx.Decoder) error

Decode decodes StopNodeResponseContent from json.

func (*StopNodeResponseContent) Encode

func (s *StopNodeResponseContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*StopNodeResponseContent) GetSuccess

func (s *StopNodeResponseContent) GetSuccess() bool

GetSuccess returns the value of Success.

func (*StopNodeResponseContent) MarshalJSON

func (s *StopNodeResponseContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*StopNodeResponseContent) SetSuccess

func (s *StopNodeResponseContent) SetSuccess(val bool)

SetSuccess sets the value of Success.

func (*StopNodeResponseContent) UnmarshalJSON

func (s *StopNodeResponseContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type TailnetSummary

type TailnetSummary struct {
	// .
	Name string      `json:"name"`
	Type TailnetType `json:"type"`
	// The server address of the tailnet. This must be set for headscale tailnets.
	ControlServer string `json:"controlServer"`
}

Summary of a tailnet. Ref: #/components/schemas/TailnetSummary

func (*TailnetSummary) Decode

func (s *TailnetSummary) Decode(d *jx.Decoder) error

Decode decodes TailnetSummary from json.

func (*TailnetSummary) Encode

func (s *TailnetSummary) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TailnetSummary) GetControlServer

func (s *TailnetSummary) GetControlServer() string

GetControlServer returns the value of ControlServer.

func (*TailnetSummary) GetName

func (s *TailnetSummary) GetName() string

GetName returns the value of Name.

func (*TailnetSummary) GetType

func (s *TailnetSummary) GetType() TailnetType

GetType returns the value of Type.

func (*TailnetSummary) MarshalJSON

func (s *TailnetSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TailnetSummary) SetControlServer

func (s *TailnetSummary) SetControlServer(val string)

SetControlServer sets the value of ControlServer.

func (*TailnetSummary) SetName

func (s *TailnetSummary) SetName(val string)

SetName sets the value of Name.

func (*TailnetSummary) SetType

func (s *TailnetSummary) SetType(val TailnetType)

SetType sets the value of Type.

func (*TailnetSummary) UnmarshalJSON

func (s *TailnetSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TailnetSummary) Validate

func (s *TailnetSummary) Validate() error

type TailnetType

type TailnetType string

Ref: #/components/schemas/TailnetType

const (
	TailnetTypeTailscale TailnetType = "tailscale"
	TailnetTypeHeadscale TailnetType = "headscale"
	TailnetTypeUnknown   TailnetType = "unknown"
)

func (TailnetType) AllValues

func (TailnetType) AllValues() []TailnetType

AllValues returns all TailnetType values.

func (*TailnetType) Decode

func (s *TailnetType) Decode(d *jx.Decoder) error

Decode decodes TailnetType from json.

func (TailnetType) Encode

func (s TailnetType) Encode(e *jx.Encoder)

Encode encodes TailnetType as json.

func (TailnetType) MarshalJSON

func (s TailnetType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (TailnetType) MarshalText

func (s TailnetType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*TailnetType) UnmarshalJSON

func (s *TailnetType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TailnetType) UnmarshalText

func (s *TailnetType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (TailnetType) Validate

func (s TailnetType) Validate() error

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) DeprovisionNode

DeprovisionNode implements DeprovisionNode operation.

Deprovision the target node.

DELETE /node/{identifier}

func (UnimplementedHandler) DescribeNode

DescribeNode implements DescribeNode operation.

Get the summary of an node.

GET /node/{identifier}

func (UnimplementedHandler) DescribeProvider

DescribeProvider implements DescribeProvider operation.

Get the summary of a provider.

GET /provider/{name}

func (UnimplementedHandler) DescribeTailnet

DescribeTailnet implements DescribeTailnet operation.

Get the summary of a provider.

GET /tailnet/{name}

func (UnimplementedHandler) GetExecution

GetExecution implements GetExecution operation.

Get the summary of an execution.

GET /execution/{identifier}

func (UnimplementedHandler) GetNodeStatus

GetNodeStatus implements GetNodeStatus operation.

Get the status of an node.

GET /node/{identifier}/status

func (UnimplementedHandler) Health

Health implements Health operation.

GET /health

func (UnimplementedHandler) ListNodes

ListNodes implements ListNodes operation.

Lists all known nodes.

GET /node

func (UnimplementedHandler) ListNotifiers added in v0.0.10

ListNotifiers implements ListNotifiers operation.

List all registered notifiers.

GET /notifier

func (UnimplementedHandler) ListProviders

ListProviders implements ListProviders operation.

List all registered providers.

GET /provider

func (UnimplementedHandler) ListTailnets

ListTailnets implements ListTailnets operation.

List all registered tailnets.

GET /tailnet

func (UnimplementedHandler) ProvisionNode

ProvisionNode implements ProvisionNode operation.

Provision a node on the specified provider in a given location on the specified tailnet.

POST /node

func (UnimplementedHandler) StartNode

func (UnimplementedHandler) StartNode(ctx context.Context, params StartNodeParams) (r StartNodeRes, _ error)

StartNode implements StartNode operation.

Starts the target node.

POST /node/{identifier}/start

func (UnimplementedHandler) StopNode

func (UnimplementedHandler) StopNode(ctx context.Context, params StopNodeParams) (r StopNodeRes, _ error)

StopNode implements StopNode operation.

Stops the target node.

POST /node/{identifier}/stop

type WorkflowName

type WorkflowName string

The name of a workflow. Ref: #/components/schemas/WorkflowName

const (
	WorkflowNameProvisionNode   WorkflowName = "provision-node"
	WorkflowNameDeprovisionNode WorkflowName = "deprovision-node"
	WorkflowNameUnknown         WorkflowName = "unknown"
)

func (WorkflowName) AllValues

func (WorkflowName) AllValues() []WorkflowName

AllValues returns all WorkflowName values.

func (*WorkflowName) Decode

func (s *WorkflowName) Decode(d *jx.Decoder) error

Decode decodes WorkflowName from json.

func (WorkflowName) Encode

func (s WorkflowName) Encode(e *jx.Encoder)

Encode encodes WorkflowName as json.

func (WorkflowName) MarshalJSON

func (s WorkflowName) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (WorkflowName) MarshalText

func (s WorkflowName) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*WorkflowName) UnmarshalJSON

func (s *WorkflowName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*WorkflowName) UnmarshalText

func (s *WorkflowName) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (WorkflowName) Validate

func (s WorkflowName) Validate() error

Jump to

Keyboard shortcuts

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