networking

package
v0.1.0-alpha.31 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const RegionNameApMum1 = shared.RegionNameApMum1

This is an alias to an internal value.

View Source
const RegionNameApSin1 = shared.RegionNameApSin1

This is an alias to an internal value.

View Source
const RegionNameApTyo1 = shared.RegionNameApTyo1

This is an alias to an internal value.

View Source
const RegionNameEuAms1 = shared.RegionNameEuAms1

This is an alias to an internal value.

View Source
const RegionNameEuFrk1 = shared.RegionNameEuFrk1

This is an alias to an internal value.

View Source
const RegionNameEuLon1 = shared.RegionNameEuLon1

This is an alias to an internal value.

View Source
const RegionNameUsChi1 = shared.RegionNameUsChi1

This is an alias to an internal value.

View Source
const RegionNameUsSea1 = shared.RegionNameUsSea1

This is an alias to an internal value.

View Source
const RegionNameUsSva1 = shared.RegionNameUsSva1

This is an alias to an internal value.

View Source
const RegionNameUsWdc1 = shared.RegionNameUsWdc1

This is an alias to an internal value.

View Source
const ResourceStatusCreating = shared.ResourceStatusCreating

This is an alias to an internal value.

View Source
const ResourceStatusDeleted = shared.ResourceStatusDeleted

This is an alias to an internal value.

View Source
const ResourceStatusDeleting = shared.ResourceStatusDeleting

This is an alias to an internal value.

View Source
const ResourceStatusFailed = shared.ResourceStatusFailed

This is an alias to an internal value.

View Source
const ResourceStatusPending = shared.ResourceStatusPending

This is an alias to an internal value.

View Source
const ResourceStatusReady = shared.ResourceStatusReady

This is an alias to an internal value.

View Source
const ResourceStatusUpdating = shared.ResourceStatusUpdating

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error = apierror.Error

type FirewallRule

type FirewallRule struct {
	ID        string `json:"id,required"`
	CreatedAt string `json:"created_at,required"`
	// Firewall rule endpoint.
	Destination FirewallRuleEndpoint `json:"destination,required"`
	Name        string               `json:"name,required"`
	// Supported Firewall Rule protocols.
	Protocol FirewallRuleProtocol `json:"protocol,required"`
	// Firewall rule endpoint.
	Source    FirewallRuleEndpoint  `json:"source,required"`
	Status    shared.ResourceStatus `json:"status,required"`
	UpdatedAt string                `json:"updated_at,required"`
	VPCID     string                `json:"vpc_id,required"`
	JSON      firewallRuleJSON      `json:"-"`
}

Firewall rule details.

func (*FirewallRule) UnmarshalJSON

func (r *FirewallRule) UnmarshalJSON(data []byte) (err error)

type FirewallRuleEndpoint

type FirewallRuleEndpoint struct {
	Address string                   `json:"address"`
	Ports   []string                 `json:"ports"`
	JSON    firewallRuleEndpointJSON `json:"-"`
}

Firewall rule endpoint.

func (*FirewallRuleEndpoint) UnmarshalJSON

func (r *FirewallRuleEndpoint) UnmarshalJSON(data []byte) (err error)

type FirewallRuleEndpointParam

type FirewallRuleEndpointParam struct {
	Address param.Field[string]   `json:"address"`
	Ports   param.Field[[]string] `json:"ports"`
}

Firewall rule endpoint.

func (FirewallRuleEndpointParam) MarshalJSON

func (r FirewallRuleEndpointParam) MarshalJSON() (data []byte, err error)

type FirewallRuleList

type FirewallRuleList struct {
	Items []FirewallRule       `json:"items,required"`
	JSON  firewallRuleListJSON `json:"-"`
}

func (*FirewallRuleList) UnmarshalJSON

func (r *FirewallRuleList) UnmarshalJSON(data []byte) (err error)

type FirewallRuleNewParams

type FirewallRuleNewParams struct {
	// Firewall rule endpoint.
	Destination param.Field[FirewallRuleEndpointParam] `json:"destination,required"`
	Name        param.Field[string]                    `json:"name,required"`
	// Supported Firewall Rule protocols.
	Protocol param.Field[string] `json:"protocol,required"`
	// Firewall rule endpoint.
	Source param.Field[FirewallRuleEndpointParam] `json:"source,required"`
}

func (FirewallRuleNewParams) MarshalJSON

func (r FirewallRuleNewParams) MarshalJSON() (data []byte, err error)

type FirewallRuleProtocol

type FirewallRuleProtocol string

Supported Firewall Rule protocols.

const (
	FirewallRuleProtocolTcp FirewallRuleProtocol = "tcp"
	FirewallRuleProtocolUdp FirewallRuleProtocol = "udp"
)

func (FirewallRuleProtocol) IsKnown

func (r FirewallRuleProtocol) IsKnown() bool

type FirewallRuleService

type FirewallRuleService struct {
	Options []option.RequestOption
}

FirewallRuleService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFirewallRuleService method instead.

func NewFirewallRuleService

func NewFirewallRuleService(opts ...option.RequestOption) (r *FirewallRuleService)

NewFirewallRuleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*FirewallRuleService) Delete

func (r *FirewallRuleService) Delete(ctx context.Context, vpcID string, firewallRuleID string, opts ...option.RequestOption) (res *operations.Operation, err error)

Delete a firewall rule

func (*FirewallRuleService) Get

func (r *FirewallRuleService) Get(ctx context.Context, vpcID string, firewallRuleID string, opts ...option.RequestOption) (res *FirewallRule, err error)

Get details about a firewall rule

func (*FirewallRuleService) List

func (r *FirewallRuleService) List(ctx context.Context, vpcID string, opts ...option.RequestOption) (res *FirewallRuleList, err error)

List all firewall rules

func (*FirewallRuleService) New

Create a firewall rule

func (*FirewallRuleService) Update

func (r *FirewallRuleService) Update(ctx context.Context, vpcID string, firewallRuleID string, body FirewallRuleUpdateParams, opts ...option.RequestOption) (res *operations.Operation, err error)

Update a firewall rule

type FirewallRuleUpdateParams

type FirewallRuleUpdateParams struct {
	// Firewall rule endpoint.
	Destination param.Field[FirewallRuleEndpointParam] `json:"destination,required"`
	Name        param.Field[string]                    `json:"name,required"`
	// Supported Firewall Rule protocols.
	Protocol param.Field[FirewallRuleUpdateParamsProtocol] `json:"protocol,required"`
	// Firewall rule endpoint.
	Source param.Field[FirewallRuleEndpointParam] `json:"source,required"`
}

func (FirewallRuleUpdateParams) MarshalJSON

func (r FirewallRuleUpdateParams) MarshalJSON() (data []byte, err error)

type FirewallRuleUpdateParamsProtocol

type FirewallRuleUpdateParamsProtocol string

Supported Firewall Rule protocols.

const (
	FirewallRuleUpdateParamsProtocolTcp FirewallRuleUpdateParamsProtocol = "tcp"
	FirewallRuleUpdateParamsProtocolUdp FirewallRuleUpdateParamsProtocol = "udp"
)

func (FirewallRuleUpdateParamsProtocol) IsKnown

type NetworkingService

type NetworkingService struct {
	Options       []option.RequestOption
	VPCs          *VPCService
	FirewallRules *FirewallRuleService
}

NetworkingService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNetworkingService method instead.

func NewNetworkingService

func NewNetworkingService(opts ...option.RequestOption) (r *NetworkingService)

NewNetworkingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type RegionName

type RegionName = shared.RegionName

This is an alias to an internal type.

type ResourceStatus

type ResourceStatus = shared.ResourceStatus

This is an alias to an internal type.

type Subnet

type Subnet struct {
	ID        string     `json:"id,required"`
	Cidr      string     `json:"cidr,required"`
	CreatedAt string     `json:"created_at,required"`
	Name      string     `json:"name,required"`
	UpdatedAt string     `json:"updated_at,required"`
	JSON      subnetJSON `json:"-"`
}

Subnet details.

func (*Subnet) UnmarshalJSON

func (r *Subnet) UnmarshalJSON(data []byte) (err error)

type VPC

type VPC struct {
	ID              string                `json:"id,required"`
	CreatedAt       string                `json:"created_at,required"`
	FirewallRuleIDs []string              `json:"firewall_rule_ids,required"`
	Name            string                `json:"name,required"`
	Region          shared.RegionName     `json:"region,required"`
	Status          shared.ResourceStatus `json:"status,required"`
	// Subnet details.
	Subnet    Subnet  `json:"subnet,required"`
	UpdatedAt string  `json:"updated_at,required"`
	JSON      vpcJSON `json:"-"`
}

VPC details.

func (*VPC) UnmarshalJSON

func (r *VPC) UnmarshalJSON(data []byte) (err error)

type VPCList

type VPCList struct {
	Items []VPC       `json:"items,required"`
	JSON  vpcListJSON `json:"-"`
}

func (*VPCList) UnmarshalJSON

func (r *VPCList) UnmarshalJSON(data []byte) (err error)

type VPCNewParams

type VPCNewParams struct {
	Name       param.Field[string]            `json:"name,required"`
	Region     param.Field[shared.RegionName] `json:"region,required"`
	SubnetName param.Field[string]            `json:"subnet_name,required"`
}

func (VPCNewParams) MarshalJSON

func (r VPCNewParams) MarshalJSON() (data []byte, err error)

type VPCService

type VPCService struct {
	Options []option.RequestOption
}

VPCService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVPCService method instead.

func NewVPCService

func NewVPCService(opts ...option.RequestOption) (r *VPCService)

NewVPCService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*VPCService) Delete

func (r *VPCService) Delete(ctx context.Context, vpcID string, opts ...option.RequestOption) (res *operations.Operation, err error)

Delete a VPC

func (*VPCService) Get

func (r *VPCService) Get(ctx context.Context, vpcID string, opts ...option.RequestOption) (res *VPC, err error)

Get details about a VPC

func (*VPCService) List

func (r *VPCService) List(ctx context.Context, opts ...option.RequestOption) (res *VPCList, err error)

List all VPCs

func (*VPCService) New

func (r *VPCService) New(ctx context.Context, body VPCNewParams, opts ...option.RequestOption) (res *operations.Operation, err error)

Create a VPC

Jump to

Keyboard shortcuts

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