staticip

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProjectStaticIpassociateStateTypeChoices added in v0.3.0

func ProjectStaticIpassociateStateTypeChoices() []string

func ProjectStaticIpdissociateStateTypeChoices added in v0.3.0

func ProjectStaticIpdissociateStateTypeChoices() []string

func ProjectStaticIppatchStateTypeChoices added in v0.3.0

func ProjectStaticIppatchStateTypeChoices() []string

func StaticIpStateTypeChoices added in v0.3.0

func StaticIpStateTypeChoices() []string

func StaticIpcreateStateTypeChoices added in v0.3.0

func StaticIpcreateStateTypeChoices() []string

Types

type Handler

type Handler interface {
	// ProjectStaticIPAssociate associate a static IP address with a service
	// POST /v1/project/{project}/static-ips/{static_ip_address_id}/association
	// https://api.aiven.io/doc/#tag/StaticIP/operation/ProjectStaticIPAssociate
	ProjectStaticIPAssociate(ctx context.Context, project string, staticIpAddressId string, in *ProjectStaticIpassociateIn) (*ProjectStaticIpassociateOut, error)

	// ProjectStaticIPAvailabilityList list static IP address cloud availability and prices for a project
	// GET /v1/project/{project}/static-ip-availability
	// https://api.aiven.io/doc/#tag/StaticIP/operation/ProjectStaticIPAvailabilityList
	ProjectStaticIPAvailabilityList(ctx context.Context, project string) ([]StaticIpAddressAvailabilityOut, error)

	// ProjectStaticIPDissociate dissociate a static IP address from a service
	// DELETE /v1/project/{project}/static-ips/{static_ip_address_id}/association
	// https://api.aiven.io/doc/#tag/StaticIP/operation/ProjectStaticIPDissociate
	ProjectStaticIPDissociate(ctx context.Context, project string, staticIpAddressId string) (*ProjectStaticIpdissociateOut, error)

	// ProjectStaticIPPatch update a static IP address configuration
	// PATCH /v1/project/{project}/static-ips/{static_ip_address_id}
	// https://api.aiven.io/doc/#tag/StaticIP/operation/ProjectStaticIPPatch
	ProjectStaticIPPatch(ctx context.Context, project string, staticIpAddressId string, in *ProjectStaticIppatchIn) (*ProjectStaticIppatchOut, error)

	// PublicStaticIPAvailabilityList list static IP clouds and prices
	// GET /v1/tenants/{tenant}/static-ip-availability
	// https://api.aiven.io/doc/#tag/Cloud_platforms/operation/PublicStaticIPAvailabilityList
	PublicStaticIPAvailabilityList(ctx context.Context, tenant string) ([]StaticIpAddressAvailabilityOut, error)

	// StaticIPCreate create static IP address
	// POST /v1/project/{project}/static-ips
	// https://api.aiven.io/doc/#tag/StaticIP/operation/StaticIPCreate
	StaticIPCreate(ctx context.Context, project string, in *StaticIpcreateIn) (*StaticIpcreateOut, error)

	// StaticIPList list static IP addresses
	// GET /v1/project/{project}/static-ips
	// https://api.aiven.io/doc/#tag/StaticIP/operation/StaticIPList
	StaticIPList(ctx context.Context, project string) ([]StaticIpOut, error)
}

type ProjectStaticIpassociateIn

type ProjectStaticIpassociateIn struct {
	ServiceName string `json:"service_name"` // Service name
}

ProjectStaticIpassociateIn ProjectStaticIPAssociateRequestBody

type ProjectStaticIpassociateOut

type ProjectStaticIpassociateOut struct {
	CloudName             string                            `json:"cloud_name"`             // Target cloud
	IpAddress             string                            `json:"ip_address"`             // IPv4 address
	ServiceName           string                            `json:"service_name"`           // Service name
	State                 ProjectStaticIpassociateStateType `json:"state"`                  // Static IP address state
	StaticIpAddressId     string                            `json:"static_ip_address_id"`   // Static IP address identifier
	TerminationProtection bool                              `json:"termination_protection"` // Static IP address is protected against deletion
}

ProjectStaticIpassociateOut ProjectStaticIPAssociateResponse

type ProjectStaticIpassociateStateType added in v0.3.0

type ProjectStaticIpassociateStateType string
const (
	ProjectStaticIpassociateStateTypeCreating  ProjectStaticIpassociateStateType = "creating"
	ProjectStaticIpassociateStateTypeCreated   ProjectStaticIpassociateStateType = "created"
	ProjectStaticIpassociateStateTypeAvailable ProjectStaticIpassociateStateType = "available"
	ProjectStaticIpassociateStateTypeAssigned  ProjectStaticIpassociateStateType = "assigned"
	ProjectStaticIpassociateStateTypeDeleting  ProjectStaticIpassociateStateType = "deleting"
	ProjectStaticIpassociateStateTypeDeleted   ProjectStaticIpassociateStateType = "deleted"
)

type ProjectStaticIpdissociateOut

type ProjectStaticIpdissociateOut struct {
	CloudName             string                             `json:"cloud_name"`             // Target cloud
	IpAddress             string                             `json:"ip_address"`             // IPv4 address
	ServiceName           string                             `json:"service_name"`           // Service name
	State                 ProjectStaticIpdissociateStateType `json:"state"`                  // Static IP address state
	StaticIpAddressId     string                             `json:"static_ip_address_id"`   // Static IP address identifier
	TerminationProtection bool                               `json:"termination_protection"` // Static IP address is protected against deletion
}

ProjectStaticIpdissociateOut ProjectStaticIPDissociateResponse

type ProjectStaticIpdissociateStateType added in v0.3.0

type ProjectStaticIpdissociateStateType string
const (
	ProjectStaticIpdissociateStateTypeCreating  ProjectStaticIpdissociateStateType = "creating"
	ProjectStaticIpdissociateStateTypeCreated   ProjectStaticIpdissociateStateType = "created"
	ProjectStaticIpdissociateStateTypeAvailable ProjectStaticIpdissociateStateType = "available"
	ProjectStaticIpdissociateStateTypeAssigned  ProjectStaticIpdissociateStateType = "assigned"
	ProjectStaticIpdissociateStateTypeDeleting  ProjectStaticIpdissociateStateType = "deleting"
	ProjectStaticIpdissociateStateTypeDeleted   ProjectStaticIpdissociateStateType = "deleted"
)

type ProjectStaticIppatchIn

type ProjectStaticIppatchIn struct {
	TerminationProtection *bool `json:"termination_protection,omitempty"` // Static IP address is protected against deletion
}

ProjectStaticIppatchIn ProjectStaticIPPatchRequestBody

type ProjectStaticIppatchOut

type ProjectStaticIppatchOut struct {
	CloudName             string                        `json:"cloud_name"`             // Target cloud
	IpAddress             string                        `json:"ip_address"`             // IPv4 address
	ServiceName           string                        `json:"service_name"`           // Service name
	State                 ProjectStaticIppatchStateType `json:"state"`                  // Static IP address state
	StaticIpAddressId     string                        `json:"static_ip_address_id"`   // Static IP address identifier
	TerminationProtection bool                          `json:"termination_protection"` // Static IP address is protected against deletion
}

ProjectStaticIppatchOut ProjectStaticIPPatchResponse

type ProjectStaticIppatchStateType added in v0.3.0

type ProjectStaticIppatchStateType string
const (
	ProjectStaticIppatchStateTypeCreating  ProjectStaticIppatchStateType = "creating"
	ProjectStaticIppatchStateTypeCreated   ProjectStaticIppatchStateType = "created"
	ProjectStaticIppatchStateTypeAvailable ProjectStaticIppatchStateType = "available"
	ProjectStaticIppatchStateTypeAssigned  ProjectStaticIppatchStateType = "assigned"
	ProjectStaticIppatchStateTypeDeleting  ProjectStaticIppatchStateType = "deleting"
	ProjectStaticIppatchStateTypeDeleted   ProjectStaticIppatchStateType = "deleted"
)

type StaticIPHandler

type StaticIPHandler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(doer doer) StaticIPHandler

func (*StaticIPHandler) ProjectStaticIPAssociate

func (h *StaticIPHandler) ProjectStaticIPAssociate(ctx context.Context, project string, staticIpAddressId string, in *ProjectStaticIpassociateIn) (*ProjectStaticIpassociateOut, error)

func (*StaticIPHandler) ProjectStaticIPAvailabilityList

func (h *StaticIPHandler) ProjectStaticIPAvailabilityList(ctx context.Context, project string) ([]StaticIpAddressAvailabilityOut, error)

func (*StaticIPHandler) ProjectStaticIPDissociate

func (h *StaticIPHandler) ProjectStaticIPDissociate(ctx context.Context, project string, staticIpAddressId string) (*ProjectStaticIpdissociateOut, error)

func (*StaticIPHandler) ProjectStaticIPPatch

func (h *StaticIPHandler) ProjectStaticIPPatch(ctx context.Context, project string, staticIpAddressId string, in *ProjectStaticIppatchIn) (*ProjectStaticIppatchOut, error)

func (*StaticIPHandler) PublicStaticIPAvailabilityList

func (h *StaticIPHandler) PublicStaticIPAvailabilityList(ctx context.Context, tenant string) ([]StaticIpAddressAvailabilityOut, error)

func (*StaticIPHandler) StaticIPCreate

func (h *StaticIPHandler) StaticIPCreate(ctx context.Context, project string, in *StaticIpcreateIn) (*StaticIpcreateOut, error)

func (*StaticIPHandler) StaticIPList

func (h *StaticIPHandler) StaticIPList(ctx context.Context, project string) ([]StaticIpOut, error)

type StaticIpAddressAvailabilityOut

type StaticIpAddressAvailabilityOut struct {
	CloudName string `json:"cloud_name"` // Target cloud
	PriceUsd  string `json:"price_usd"`  // Hourly static IP address price in this cloud region
}

type StaticIpOut

type StaticIpOut struct {
	CloudName             string            `json:"cloud_name"`             // Target cloud
	IpAddress             string            `json:"ip_address"`             // IPv4 address
	ServiceName           string            `json:"service_name"`           // Service name
	State                 StaticIpStateType `json:"state"`                  // Static IP address state
	StaticIpAddressId     string            `json:"static_ip_address_id"`   // Static IP address identifier
	TerminationProtection bool              `json:"termination_protection"` // Static IP address is protected against deletion
}

type StaticIpStateType added in v0.3.0

type StaticIpStateType string
const (
	StaticIpStateTypeCreating  StaticIpStateType = "creating"
	StaticIpStateTypeCreated   StaticIpStateType = "created"
	StaticIpStateTypeAvailable StaticIpStateType = "available"
	StaticIpStateTypeAssigned  StaticIpStateType = "assigned"
	StaticIpStateTypeDeleting  StaticIpStateType = "deleting"
	StaticIpStateTypeDeleted   StaticIpStateType = "deleted"
)

type StaticIpcreateIn

type StaticIpcreateIn struct {
	CloudName             string `json:"cloud_name"`                       // Target cloud
	TerminationProtection *bool  `json:"termination_protection,omitempty"` // Static IP address is protected against deletion
}

StaticIpcreateIn StaticIPCreateRequestBody

type StaticIpcreateOut

type StaticIpcreateOut struct {
	CloudName             string                  `json:"cloud_name"`             // Target cloud
	IpAddress             string                  `json:"ip_address"`             // IPv4 address
	ServiceName           string                  `json:"service_name"`           // Service name
	State                 StaticIpcreateStateType `json:"state"`                  // Static IP address state
	StaticIpAddressId     string                  `json:"static_ip_address_id"`   // Static IP address identifier
	TerminationProtection bool                    `json:"termination_protection"` // Static IP address is protected against deletion
}

StaticIpcreateOut StaticIPCreateResponse

type StaticIpcreateStateType added in v0.3.0

type StaticIpcreateStateType string
const (
	StaticIpcreateStateTypeCreating  StaticIpcreateStateType = "creating"
	StaticIpcreateStateTypeCreated   StaticIpcreateStateType = "created"
	StaticIpcreateStateTypeAvailable StaticIpcreateStateType = "available"
	StaticIpcreateStateTypeAssigned  StaticIpcreateStateType = "assigned"
	StaticIpcreateStateTypeDeleting  StaticIpcreateStateType = "deleting"
	StaticIpcreateStateTypeDeleted   StaticIpcreateStateType = "deleted"
)

Jump to

Keyboard shortcuts

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