Documentation ¶
Index ¶
- type Flavor
- type GetFlavorsResponse
- type GetStorageResponse
- type MongoDBOptionsService
- func (svc *MongoDBOptionsService) GetFlavors(ctx context.Context, projectID string) (res GetFlavorsResponse, err error)
- func (svc *MongoDBOptionsService) GetStorageClasses(ctx context.Context, projectID, flavorID string) (res GetStorageResponse, err error)
- func (svc *MongoDBOptionsService) 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"` 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 ¶
MongoDBOptionsService is the service that retrieves the provider options
func New ¶
func New(c common.Client) *MongoDBOptionsService
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 ¶
StorageRange represents the storage size range
type VersionsResponse ¶
type VersionsResponse struct {
Versions []string `json:"versions,omitempty"`
}
VersionsResponse is the APIs response for available versions