Documentation ¶
Index ¶
- type Flavor
- type GetFlavorsResponse
- type GetStorageResponse
- type PostgresOptionsService
- func (svc *PostgresOptionsService) GetFlavors(ctx context.Context, projectID string) (res GetFlavorsResponse, err error)
- func (svc *PostgresOptionsService) GetStorageClasses(ctx context.Context, projectID, flavorID string) (res GetStorageResponse, err error)
- func (svc *PostgresOptionsService) GetVersions(ctx context.Context, projectID string) (res VersionsResponse, err error)
- type StorageRange
- type VersionsResponse
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 ¶
PostgresOptionsService is the service that retrieves the provider options
func New ¶
func New(c common.Client) *PostgresOptionsService
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 ¶
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