Documentation
¶
Index ¶
- Constants
- type Error
- type FirewallRule
- type FirewallRuleList
- type FirewallRuleNewParams
- type FirewallRuleProtocol
- type FirewallRuleService
- func (r *FirewallRuleService) Delete(ctx context.Context, vpcID string, firewallRuleID string, ...) (res *operations.Operation, err error)
- func (r *FirewallRuleService) Get(ctx context.Context, vpcID string, firewallRuleID string, ...) (res *FirewallRule, err error)
- func (r *FirewallRuleService) List(ctx context.Context, vpcID string, opts ...option.RequestOption) (res *FirewallRuleList, err error)
- func (r *FirewallRuleService) New(ctx context.Context, vpcID string, body FirewallRuleNewParams, ...) (res *operations.Operation, err error)
- func (r *FirewallRuleService) Update(ctx context.Context, vpcID string, firewallRuleID string, ...) (res *operations.Operation, err error)
- type FirewallRuleUpdateParams
- type FirewallRuleUpdateParamsProtocol
- type NetworkingService
- type RegionName
- type ResourceStatus
- type Subnet
- type VPC
- type VPCList
- type VPCNewParams
- type VPCService
- func (r *VPCService) Delete(ctx context.Context, vpcID string, opts ...option.RequestOption) (res *operations.Operation, err error)
- func (r *VPCService) Get(ctx context.Context, vpcID string, opts ...option.RequestOption) (res *VPC, err error)
- func (r *VPCService) List(ctx context.Context, opts ...option.RequestOption) (res *VPCList, err error)
- func (r *VPCService) New(ctx context.Context, body VPCNewParams, opts ...option.RequestOption) (res *operations.Operation, err error)
- func (r *VPCService) Update(ctx context.Context, vpcID string, body VPCUpdateParams, ...) (res *operations.Operation, err error)
- type VPCUpdateParams
Constants ¶
const RegionNameApSeo1 = shared.RegionNameApSeo1
This is an alias to an internal value.
const RegionNameApSin1 = shared.RegionNameApSin1
This is an alias to an internal value.
const RegionNameApTyo1 = shared.RegionNameApTyo1
This is an alias to an internal value.
const RegionNameEuAms1 = shared.RegionNameEuAms1
This is an alias to an internal value.
const RegionNameEuFrk1 = shared.RegionNameEuFrk1
This is an alias to an internal value.
const RegionNameEuLon1 = shared.RegionNameEuLon1
This is an alias to an internal value.
const RegionNameUsChi1 = shared.RegionNameUsChi1
This is an alias to an internal value.
const RegionNameUsSea1 = shared.RegionNameUsSea1
This is an alias to an internal value.
const RegionNameUsSva1 = shared.RegionNameUsSva1
This is an alias to an internal value.
const RegionNameUsWdc1 = shared.RegionNameUsWdc1
This is an alias to an internal value.
const ResourceStatusCreating = shared.ResourceStatusCreating
This is an alias to an internal value.
const ResourceStatusDeleted = shared.ResourceStatusDeleted
This is an alias to an internal value.
const ResourceStatusDeleting = shared.ResourceStatusDeleting
This is an alias to an internal value.
const ResourceStatusError = shared.ResourceStatusError
This is an alias to an internal value.
const ResourceStatusPending = shared.ResourceStatusPending
This is an alias to an internal value.
const ResourceStatusReady = shared.ResourceStatusReady
This is an alias to an internal value.
const ResourceStatusUpdating = shared.ResourceStatusUpdating
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FirewallRule ¶
type FirewallRule struct {
// Unique identifier for the firewall rule.
ID string `json:"id,required"`
// When the firewall rule was created.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Destination address of the firewall rule.
DestinationAddress string `json:"destination_address,required"`
// Destination ports of the firewall rule.
DestinationPorts []string `json:"destination_ports,required"`
// Name of the firewall rule.
Name string `json:"name,required"`
// Protocol of the firewall rule.
Protocol FirewallRuleProtocol `json:"protocol,required"`
// Source address of the firewall rule.
SourceAddress string `json:"source_address,required"`
// Status of the resource.
Status shared.ResourceStatus `json:"status,required"`
// When the firewall rule was updated.
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// ID of the VPC the firewall rule belongs to.
VPCID string `json:"vpc_id,required"`
JSON firewallRuleJSON `json:"-"`
}
Firewall rule details.
func (*FirewallRule) UnmarshalJSON ¶
func (r *FirewallRule) UnmarshalJSON(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 {
// Destination address of the firewall rule.
DestinationAddress param.Field[string] `json:"destination_address,required"`
// Destination ports of the firewall rule.
DestinationPorts param.Field[[]string] `json:"destination_ports,required"`
// Name of the firewall rule.
Name param.Field[string] `json:"name,required"`
// Protocol of the firewall rule.
Protocol param.Field[string] `json:"protocol,required"`
// Source address of the firewall rule.
SourceAddress param.Field[string] `json:"source_address,required"`
}
func (FirewallRuleNewParams) MarshalJSON ¶
func (r FirewallRuleNewParams) MarshalJSON() (data []byte, err error)
type FirewallRuleProtocol ¶
type FirewallRuleProtocol string
Protocol of the firewall rule.
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 ¶
func (r *FirewallRuleService) New(ctx context.Context, vpcID string, body FirewallRuleNewParams, opts ...option.RequestOption) (res *operations.Operation, err error)
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 {
// Destination address of the firewall rule.
DestinationAddress param.Field[string] `json:"destination_address"`
// Destination ports of the firewall rule.
DestinationPorts param.Field[[]string] `json:"destination_ports"`
// Name of the firewall rule.
Name param.Field[string] `json:"name"`
// Protocol of the firewall rule.
Protocol param.Field[FirewallRuleUpdateParamsProtocol] `json:"protocol"`
// Source address of the firewall rule.
SourceAddress param.Field[string] `json:"source_address"`
}
func (FirewallRuleUpdateParams) MarshalJSON ¶
func (r FirewallRuleUpdateParams) MarshalJSON() (data []byte, err error)
type FirewallRuleUpdateParamsProtocol ¶
type FirewallRuleUpdateParamsProtocol string
Protocol of the firewall rule.
const ( FirewallRuleUpdateParamsProtocolTcp FirewallRuleUpdateParamsProtocol = "tcp" FirewallRuleUpdateParamsProtocolUdp FirewallRuleUpdateParamsProtocol = "udp" )
func (FirewallRuleUpdateParamsProtocol) IsKnown ¶
func (r FirewallRuleUpdateParamsProtocol) IsKnown() bool
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
Region the resource is in.
This is an alias to an internal type.
type ResourceStatus ¶
type ResourceStatus = shared.ResourceStatus
Status of the resource.
This is an alias to an internal type.
type Subnet ¶
type Subnet struct {
// Unique identifier for the subnet.
ID string `json:"id,required"`
// CIDR block for the subnet.
Cidr string `json:"cidr,required"`
// When the subnet was created.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Name of the subnet.
Name string `json:"name,required"`
// When the subnet was updated.
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
JSON subnetJSON `json:"-"`
}
Subnet of the VPC.
func (*Subnet) UnmarshalJSON ¶
type VPC ¶
type VPC struct {
// Unique identifier for the VPC.
ID string `json:"id,required"`
// When the VPC was created.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// IDs of the firewall rules associated with the VPC.
FirewallRuleIDs []string `json:"firewall_rule_ids,required"`
// Name of the VPC.
Name string `json:"name,required"`
// Region the resource is in.
Region shared.RegionName `json:"region,required"`
// Status of the resource.
Status shared.ResourceStatus `json:"status,required"`
// Subnet of the VPC.
Subnet Subnet `json:"subnet,required"`
// When the VPC was updated.
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
JSON vpcJSON `json:"-"`
}
VPC details.
func (*VPC) UnmarshalJSON ¶
type VPCList ¶
type VPCList struct {
Items []VPC `json:"items,required"`
JSON vpcListJSON `json:"-"`
}
func (*VPCList) UnmarshalJSON ¶
type VPCNewParams ¶
type VPCNewParams struct {
// Name of the VPC.
Name param.Field[string] `json:"name,required"`
// Region the resource is in.
Region param.Field[shared.RegionName] `json:"region,required"`
// Name of the subnet to create.
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
func (*VPCService) Update ¶
func (r *VPCService) Update(ctx context.Context, vpcID string, body VPCUpdateParams, opts ...option.RequestOption) (res *operations.Operation, err error)
Update a VPC
type VPCUpdateParams ¶
type VPCUpdateParams struct {
// Name of the VPC.
Name param.Field[string] `json:"name"`
// Name of the subnet to create.
SubnetName param.Field[string] `json:"subnet_name"`
}
func (VPCUpdateParams) MarshalJSON ¶
func (r VPCUpdateParams) MarshalJSON() (data []byte, err error)