options

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flavor

type Flavor struct {
	ID          string `json:"id,omitempty"`
	Description string `json:"description,omitempty"`
	CPU         int    `json:"cpu,omitempty"`
	Memory      int    `json:"memory,omitempty"`
}

Flavor represents a single flavor

type GetFlavorsResponse

type GetFlavorsResponse struct {
	Flavors []Flavor `json:"flavors,omitempty"`
}

GetFlavorsResponse is the server response to GetFlavors call

type GetStorageResponse

type GetStorageResponse struct {
	StorageClasses []string     `json:"storageClasses,omitempty"`
	StorageRange   StorageRange `json:"storageRange,omitempty"`
}

GetStorageResponse is the API response for the storage range for a StorageClass

type PostgresOptionsService

type PostgresOptionsService common.Service

PostgresOptionsService is the service that retrieves the provider options

func New

New returns a new handler for the service

func (*PostgresOptionsService) GetFlavors

func (svc *PostgresOptionsService) GetFlavors(ctx context.Context, projectID string) (res GetFlavorsResponse, err error)

GetFlavors returns available flavors See also https://api.stackit.schwarz/postgres-flex-service/openapi.html#tag/flavors

func (*PostgresOptionsService) GetStorageClasses

func (svc *PostgresOptionsService) GetStorageClasses(ctx context.Context, projectID, flavorID string) (res GetStorageResponse, err error)

GetStorageClasses returns available storage reange for a given flavor See also https://api.stackit.schwarz/postgres-flex-service/openapi.html#tag/storage

func (*PostgresOptionsService) GetVersions

func (svc *PostgresOptionsService) GetVersions(ctx context.Context, projectID string) (res VersionsResponse, err error)

GetVersions returns all available Postgres Flex versions See also https://api.stackit.schwarz/postgres-flex-service/openapi.html#tag/versions

type StorageRange

type StorageRange struct {
	Max int `json:"max,omitempty"`
	Min int `json:"min,omitempty"`
}

StorageRange represents the storage size range

type VersionsResponse added in v1.3.3

type VersionsResponse struct {
	Versions []string `json:"versions,omitempty"`
}

VersionsResponse is the APIs response for available versions

Jump to

Keyboard shortcuts

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