Documentation
¶
Index ¶
- Constants
- type Error
- type RegionName
- type ResourceStatus
- type Subnet
- type VPC
- type VPCListResponse
- 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 *VPCListResponse, err error)
- func (r *VPCService) New(ctx context.Context, body VPCNewParams, opts ...option.RequestOption) (res *operations.Operation, err error)
Constants ¶
const RegionNameAmsterdam = shared.RegionNameAmsterdam
This is an alias to an internal value.
const RegionNameChicago = shared.RegionNameChicago
This is an alias to an internal value.
const RegionNameFrankfurt = shared.RegionNameFrankfurt
This is an alias to an internal value.
const RegionNameHongkong = shared.RegionNameHongkong
This is an alias to an internal value.
const RegionNameLondon = shared.RegionNameLondon
This is an alias to an internal value.
const RegionNameMumbai = shared.RegionNameMumbai
This is an alias to an internal value.
const RegionNameSaopaulo = shared.RegionNameSaopaulo
This is an alias to an internal value.
const RegionNameSeattle = shared.RegionNameSeattle
This is an alias to an internal value.
const RegionNameSiliconvalley = shared.RegionNameSiliconvalley
This is an alias to an internal value.
const RegionNameSingapore = shared.RegionNameSingapore
This is an alias to an internal value.
const RegionNameStockholm = shared.RegionNameStockholm
This is an alias to an internal value.
const RegionNameSydney = shared.RegionNameSydney
This is an alias to an internal value.
const RegionNameTokyo = shared.RegionNameTokyo
This is an alias to an internal value.
const RegionNameWashingtondc = shared.RegionNameWashingtondc
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 ResourceStatusFailed = shared.ResourceStatusFailed
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 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 ¶
type VPC ¶
type VPC struct {
ID string `json:"id,required"`
CreatedAt string `json:"created_at,required"`
FirewallRules []firewall_rules.FirewallRule `json:"firewall_rules,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 ¶
type VPCListResponse ¶
type VPCListResponse struct {
Items []VPC `json:"items,required"`
JSON vpcListResponseJSON `json:"-"`
}
func (*VPCListResponse) UnmarshalJSON ¶
func (r *VPCListResponse) 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 *VPCListResponse, 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