Documentation
¶
Index ¶
- Constants
- type ConnectService
- type Error
- type Flux
- type FluxList
- type FluxNewParams
- type FluxProvider
- type FluxProviderAWSConfig
- type FluxProviderAWSConfigRequestParam
- type FluxProviderList
- type FluxProviderService
- type FluxService
- func (r *FluxService) Delete(ctx context.Context, fluxID string, opts ...option.RequestOption) (res *operations.Operation, err error)
- func (r *FluxService) Get(ctx context.Context, fluxID string, opts ...option.RequestOption) (res *Flux, err error)
- func (r *FluxService) List(ctx context.Context, opts ...option.RequestOption) (res *FluxList, err error)
- func (r *FluxService) New(ctx context.Context, body FluxNewParams, opts ...option.RequestOption) (res *operations.Operation, err error)
- func (r *FluxService) Update(ctx context.Context, fluxID string, body FluxUpdateParams, ...) (res *operations.Operation, err error)
- type FluxUpdateParams
- type RegionName
- type ResourceStatus
Constants ¶
const RegionNameApSeo1 = shared.RegionNameApSeo1
Equals "ap-seo-1"
const RegionNameApSin1 = shared.RegionNameApSin1
Equals "ap-sin-1"
const RegionNameApTyo1 = shared.RegionNameApTyo1
Equals "ap-tyo-1"
const RegionNameEuFrk1 = shared.RegionNameEuFrk1
Equals "eu-frk-1"
const RegionNameUsChi1 = shared.RegionNameUsChi1
Equals "us-chi-1"
const RegionNameUsSea1 = shared.RegionNameUsSea1
Equals "us-sea-1"
const RegionNameUsSva1 = shared.RegionNameUsSva1
Equals "us-sva-1"
const RegionNameUsWdc1 = shared.RegionNameUsWdc1
Equals "us-wdc-1"
const ResourceStatusCreating = shared.ResourceStatusCreating
Equals "creating"
const ResourceStatusDeleted = shared.ResourceStatusDeleted
Equals "deleted"
const ResourceStatusDeleting = shared.ResourceStatusDeleting
Equals "deleting"
const ResourceStatusError = shared.ResourceStatusError
Equals "error"
const ResourceStatusPending = shared.ResourceStatusPending
Equals "pending"
const ResourceStatusReady = shared.ResourceStatusReady
Equals "ready"
const ResourceStatusUpdating = shared.ResourceStatusUpdating
Equals "updating"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectService ¶
type ConnectService struct {
Options []option.RequestOption
Flux FluxService
}
ConnectService 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 NewConnectService method instead.
func NewConnectService ¶
func NewConnectService(opts ...option.RequestOption) (r ConnectService)
NewConnectService 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 Flux ¶ added in v1.15.0
type Flux struct {
// Unique identifier for the Connect Flux
ID string `json:"id,required"`
// ASN
ASN int64 `json:"asn,required"`
// AWS provider configuration
AWS FluxProviderAWSConfig `json:"aws,required"`
// Connect Flux speed in Mbps
//
// Any of 50, 200, 500, 1000, 2000.
BandwidthMbps int64 `json:"bandwidth_mbps,required"`
// CIDRs for the Connect Flux
CIDRs []string `json:"cidrs,required"`
// When the Connect Flux was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Name of the Connect Flux
Name string `json:"name,required"`
// Provider ASN
ProviderASN int64 `json:"provider_asn,required"`
// Provider CIDRs for the Connect Flux
ProviderCIDRs []string `json:"provider_cidrs,required"`
// Provider Router IP
ProviderRouterIP string `json:"provider_router_ip,required"`
// Region the resource is in.
//
// Any of "us-sea-1", "us-sva-1", "us-chi-1", "us-wdc-1", "eu-frk-1", "ap-sin-1",
// "ap-seo-1", "ap-tyo-1".
Region shared.RegionName `json:"region,required"`
// Router IP
RouterIP string `json:"router_ip,required"`
// Status of the resource.
//
// Any of "pending", "creating", "updating", "ready", "deleting", "deleted",
// "error".
Status shared.ResourceStatus `json:"status,required"`
// When the Connect Flux was updated
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ASN respjson.Field
AWS respjson.Field
BandwidthMbps respjson.Field
CIDRs respjson.Field
CreatedAt respjson.Field
Name respjson.Field
ProviderASN respjson.Field
ProviderCIDRs respjson.Field
ProviderRouterIP respjson.Field
Region respjson.Field
RouterIP respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Connect flux details.
func (*Flux) UnmarshalJSON ¶ added in v1.15.0
type FluxList ¶ added in v1.15.0
type FluxList struct {
Items []Flux `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*FluxList) UnmarshalJSON ¶ added in v1.15.0
type FluxNewParams ¶ added in v1.15.0
type FluxNewParams struct {
// Connect Flux speed in Mbps
//
// Any of 50, 200, 500, 1000, 2000.
BandwidthMbps int64 `json:"bandwidth_mbps,omitzero,required"`
// CIDRs for the Connect Flux
CIDRs []string `json:"cidrs,omitzero,required"`
// Name of the Connect Flux
Name string `json:"name,required"`
// Provider CIDRs
ProviderCIDRs []string `json:"provider_cidrs,omitzero,required"`
// Region the resource is in.
//
// Any of "us-sea-1", "us-sva-1", "us-chi-1", "us-wdc-1", "eu-frk-1", "ap-sin-1",
// "ap-seo-1", "ap-tyo-1".
Region shared.RegionName `json:"region,omitzero,required"`
// AWS provider configuration
AWS FluxProviderAWSConfigRequestParam `json:"aws,omitzero"`
// contains filtered or unexported fields
}
func (FluxNewParams) MarshalJSON ¶ added in v1.15.0
func (r FluxNewParams) MarshalJSON() (data []byte, err error)
func (*FluxNewParams) UnmarshalJSON ¶ added in v1.15.0
func (r *FluxNewParams) UnmarshalJSON(data []byte) error
type FluxProvider ¶ added in v1.15.0
type FluxProvider struct {
// Provider name.
Name string `json:"name,required"`
// Provider region name.
Region string `json:"region,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Region respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Provider supported for Connect Flux.
func (FluxProvider) RawJSON ¶ added in v1.15.0
func (r FluxProvider) RawJSON() string
Returns the unmodified JSON received from the API
func (*FluxProvider) UnmarshalJSON ¶ added in v1.15.0
func (r *FluxProvider) UnmarshalJSON(data []byte) error
type FluxProviderAWSConfig ¶ added in v1.17.0
type FluxProviderAWSConfig struct {
// AWS region where the connection is established
Region string `json:"region,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Region respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
AWS provider configuration
func (FluxProviderAWSConfig) RawJSON ¶ added in v1.17.0
func (r FluxProviderAWSConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*FluxProviderAWSConfig) UnmarshalJSON ¶ added in v1.17.0
func (r *FluxProviderAWSConfig) UnmarshalJSON(data []byte) error
type FluxProviderAWSConfigRequestParam ¶ added in v1.17.0
type FluxProviderAWSConfigRequestParam struct {
// AWS account number
AccountNumber string `json:"account_number,required"`
// AWS region where the connection will be established
Region string `json:"region,required"`
// contains filtered or unexported fields
}
AWS provider configuration
The properties AccountNumber, Region are required.
func (FluxProviderAWSConfigRequestParam) MarshalJSON ¶ added in v1.17.0
func (r FluxProviderAWSConfigRequestParam) MarshalJSON() (data []byte, err error)
func (*FluxProviderAWSConfigRequestParam) UnmarshalJSON ¶ added in v1.17.0
func (r *FluxProviderAWSConfigRequestParam) UnmarshalJSON(data []byte) error
type FluxProviderList ¶ added in v1.15.0
type FluxProviderList struct {
Items []FluxProvider `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FluxProviderList) RawJSON ¶ added in v1.15.0
func (r FluxProviderList) RawJSON() string
Returns the unmodified JSON received from the API
func (*FluxProviderList) UnmarshalJSON ¶ added in v1.15.0
func (r *FluxProviderList) UnmarshalJSON(data []byte) error
type FluxProviderService ¶ added in v1.15.0
type FluxProviderService struct {
Options []option.RequestOption
}
FluxProviderService 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 NewFluxProviderService method instead.
func NewFluxProviderService ¶ added in v1.15.0
func NewFluxProviderService(opts ...option.RequestOption) (r FluxProviderService)
NewFluxProviderService 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 (*FluxProviderService) List ¶ added in v1.15.0
func (r *FluxProviderService) List(ctx context.Context, opts ...option.RequestOption) (res *FluxProviderList, err error)
List all supported providers with regions for Connect Flux.
type FluxService ¶
type FluxService struct {
Options []option.RequestOption
Providers FluxProviderService
}
FluxService 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 NewFluxService method instead.
func NewFluxService ¶
func NewFluxService(opts ...option.RequestOption) (r FluxService)
NewFluxService 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 (*FluxService) Delete ¶ added in v1.15.0
func (r *FluxService) Delete(ctx context.Context, fluxID string, opts ...option.RequestOption) (res *operations.Operation, err error)
Delete Connect Flux
func (*FluxService) Get ¶
func (r *FluxService) Get(ctx context.Context, fluxID string, opts ...option.RequestOption) (res *Flux, err error)
Get Connect Flux details
func (*FluxService) List ¶
func (r *FluxService) List(ctx context.Context, opts ...option.RequestOption) (res *FluxList, err error)
List all Connect Flux
func (*FluxService) New ¶ added in v1.15.0
func (r *FluxService) New(ctx context.Context, body FluxNewParams, opts ...option.RequestOption) (res *operations.Operation, err error)
Create a Connect Flux
func (*FluxService) Update ¶ added in v1.15.0
func (r *FluxService) Update(ctx context.Context, fluxID string, body FluxUpdateParams, opts ...option.RequestOption) (res *operations.Operation, err error)
Update Connect Flux details
type FluxUpdateParams ¶ added in v1.15.0
type FluxUpdateParams struct {
// Name of the Connect Flux.
Name param.Opt[string] `json:"name,omitzero"`
// contains filtered or unexported fields
}
func (FluxUpdateParams) MarshalJSON ¶ added in v1.15.0
func (r FluxUpdateParams) MarshalJSON() (data []byte, err error)
func (*FluxUpdateParams) UnmarshalJSON ¶ added in v1.15.0
func (r *FluxUpdateParams) UnmarshalJSON(data []byte) error
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.