Documentation
¶
Index ¶
- Constants
- type Error
- type FirewallRule
- type FirewallRuleEndpoint
- type FirewallRuleEndpointParam
- type FirewallRuleList
- type FirewallRuleNewParams
- type FirewallRuleService
- func (r *FirewallRuleService) Delete(ctx context.Context, vpcID string, firewallRuleID string, ...) (res *shared.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 *shared.Operation, err error)
- func (r *FirewallRuleService) Update(ctx context.Context, vpcID string, firewallRuleID string, ...) (res *shared.Operation, err error)
- type FirewallRuleUpdateParams
- type FirewallRuleUpdateParamsProtocol
- type Operation
- type OperationKind
- type OperationService
- type OperationStatus
- type OperationType
- type RegionName
- type ResourceStatus
Constants ¶
const OperationKindFirewallRule = shared.OperationKindFirewallRule
This is an alias to an internal value.
const OperationKindVM = shared.OperationKindVM
This is an alias to an internal value.
const OperationKindVPC = shared.OperationKindVPC
This is an alias to an internal value.
const OperationStatusDone = shared.OperationStatusDone
This is an alias to an internal value.
const OperationStatusFailed = shared.OperationStatusFailed
This is an alias to an internal value.
const OperationStatusPending = shared.OperationStatusPending
This is an alias to an internal value.
const OperationStatusRunning = shared.OperationStatusRunning
This is an alias to an internal value.
const OperationTypeCreate = shared.OperationTypeCreate
This is an alias to an internal value.
const OperationTypeDelete = shared.OperationTypeDelete
This is an alias to an internal value.
const OperationTypeUpdate = shared.OperationTypeUpdate
This is an alias to an internal value.
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 FirewallRule ¶
type FirewallRule struct {
ID string `json:"id,required"`
CreatedAt string `json:"created_at,required"`
// Firewall rule endpoint.
Dest FirewallRuleEndpoint `json:"dest,required"`
Name string `json:"name,required"`
Protocol string `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,required"`
Ports []string `json:"ports,required"`
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,required"`
Ports param.Field[[]string] `json:"ports,required"`
}
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 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 FirewallRuleService ¶
type FirewallRuleService struct {
Options []option.RequestOption
Operations *OperationService
}
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 *shared.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 *shared.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 *shared.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 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 protocols.
const ( FirewallRuleUpdateParamsProtocolTcp FirewallRuleUpdateParamsProtocol = "tcp" FirewallRuleUpdateParamsProtocolUdp FirewallRuleUpdateParamsProtocol = "udp" )
func (FirewallRuleUpdateParamsProtocol) IsKnown ¶
func (r FirewallRuleUpdateParamsProtocol) IsKnown() bool
type OperationKind ¶
type OperationKind = shared.OperationKind
This is an alias to an internal type.
type OperationService ¶
type OperationService struct {
Options []option.RequestOption
}
OperationService 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 NewOperationService method instead.
func NewOperationService ¶
func NewOperationService(opts ...option.RequestOption) (r *OperationService)
NewOperationService 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 (*OperationService) Operations ¶
func (r *OperationService) Operations(ctx context.Context, vpcID string, operationID string, opts ...option.RequestOption) (res *shared.Operation, err error)
Get details of a firewall rule operation
type OperationStatus ¶
type OperationStatus = shared.OperationStatus
This is an alias to an internal type.
type OperationType ¶
type OperationType = shared.OperationType
This is an alias to an internal type.
type ResourceStatus ¶
type ResourceStatus = shared.ResourceStatus
This is an alias to an internal type.