staticip

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	// ProjectStaticIPAssociate associate a static IP address with a service
	// POST /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 /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 /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 /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 /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 /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 /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"`
}

type ProjectStaticIpassociateOut

type ProjectStaticIpassociateOut struct {
	CloudName             string `json:"cloud_name"`
	IpAddress             string `json:"ip_address"`
	ServiceName           string `json:"service_name"`
	State                 string `json:"state"`
	StaticIpAddressId     string `json:"static_ip_address_id"`
	TerminationProtection bool   `json:"termination_protection"`
}

type ProjectStaticIpdissociateOut

type ProjectStaticIpdissociateOut struct {
	CloudName             string `json:"cloud_name"`
	IpAddress             string `json:"ip_address"`
	ServiceName           string `json:"service_name"`
	State                 string `json:"state"`
	StaticIpAddressId     string `json:"static_ip_address_id"`
	TerminationProtection bool   `json:"termination_protection"`
}

type ProjectStaticIppatchIn

type ProjectStaticIppatchIn struct {
	TerminationProtection *bool `json:"termination_protection,omitempty"`
}

type ProjectStaticIppatchOut

type ProjectStaticIppatchOut struct {
	CloudName             string `json:"cloud_name"`
	IpAddress             string `json:"ip_address"`
	ServiceName           string `json:"service_name"`
	State                 string `json:"state"`
	StaticIpAddressId     string `json:"static_ip_address_id"`
	TerminationProtection bool   `json:"termination_protection"`
}

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"`
	PriceUsd  string `json:"price_usd"`
}

type StaticIpOut

type StaticIpOut struct {
	CloudName             string `json:"cloud_name"`
	IpAddress             string `json:"ip_address"`
	ServiceName           string `json:"service_name"`
	State                 string `json:"state"`
	StaticIpAddressId     string `json:"static_ip_address_id"`
	TerminationProtection bool   `json:"termination_protection"`
}

type StaticIpcreateIn

type StaticIpcreateIn struct {
	CloudName             string `json:"cloud_name"`
	TerminationProtection *bool  `json:"termination_protection,omitempty"`
}

type StaticIpcreateOut

type StaticIpcreateOut struct {
	CloudName             string `json:"cloud_name"`
	IpAddress             string `json:"ip_address"`
	ServiceName           string `json:"service_name"`
	State                 string `json:"state"`
	StaticIpAddressId     string `json:"static_ip_address_id"`
	TerminationProtection bool   `json:"termination_protection"`
}

Jump to

Keyboard shortcuts

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