users

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Endpoint = "/users"

Endpoint is the public path for the users service.

Variables

This section is empty.

Functions

This section is empty.

Types

type QuotasResponseItem added in v0.5.0

type QuotasResponseItem struct {
	UUID   string               `json:"uuid"`
	Used   QuotasResponseUsed   `json:"used"`
	Hard   QuotasResponseUsed   `json:"hard"`
	Limits QuotasResponseLimits `json:"limits"`

	kcclient.APIResponseCommon
}

QuotasResponseItem is a data item from a response to a GET /users/quotas request. https://docs.kraft.cloud/api/v1/users/#list-quota-usage-and-limits

type QuotasResponseLimits added in v0.5.0

type QuotasResponseLimits struct {
	MinMemoryMb      int `json:"min_memory_mb"`
	MaxMemoryMb      int `json:"max_memory_mb"`
	MinVolumeMb      int `json:"min_volume_mb"`
	MaxVolumeMb      int `json:"max_volume_mb"`
	MinAutoscaleSize int `json:"min_autoscale_size"`
	MaxAutoscaleSize int `json:"max_autoscale_size"`
}

type QuotasResponseUsed added in v0.5.0

type QuotasResponseUsed struct {
	Instances     int `json:"instances"`
	LiveInstances int `json:"live_instances"`
	LiveMemoryMb  int `json:"live_memory_mb"`
	ServiceGroups int `json:"service_groups"`
	Services      int `json:"services"`
	Volumes       int `json:"volumes"`
	TotalVolumeMb int `json:"total_volume_mb"`
}

type UsersService

type UsersService interface {
	kcclient.ServiceClient[UsersService]

	// Lists quota usage and limits of your user account. Limits are hard limits
	// that cannot be exceeded.
	// https://docs.kraft.cloud/api/v1/users/#list-quota-usage-and-limits
	Quotas(ctx context.Context) (*kcclient.ServiceResponse[QuotasResponseItem], error)
}

func NewUsersClientFromOptions

func NewUsersClientFromOptions(opts *options.Options) UsersService

NewUsersClientFromOptions instantiates a new users services client based on the provided pre-existing options.

Jump to

Keyboard shortcuts

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