options

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 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 []string, 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

Jump to

Keyboard shortcuts

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