options

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 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"`
	Categories  []string `json:"categories,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 MongoDBOptionsService

type MongoDBOptionsService common.Service

MongoDBOptionsService is the service that retrieves the provider options

func New

New returns a new handler for the service

func (*MongoDBOptionsService) GetFlavors

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

GetFlavors returns available flavors See also https://api.stackit.schwarz/mongo-flex-service/openapi.html#/paths/~1projects~1{projectId}~1flavors/get

func (*MongoDBOptionsService) GetStorageClasses

func (svc *MongoDBOptionsService) 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/mongo-flex-service/openapi.html#/paths/~1projects~1{projectId}~1versions/get

func (*MongoDBOptionsService) GetVersions

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

GetVersions returns all available MongoDB Flex versions See also https://api.stackit.schwarz/mongo-flex-service/openapi.html#/paths/~1projects~1{projectId}~1versions/get

type StorageRange

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

StorageRange represents the storage size range

type VersionsResponse

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