Documentation
¶
Overview ¶
Lists all the stack.
Index ¶
- type GetRequest
- type InfoStack
- type ItemStack
- type ListRequest
- type ListStacks
- type Stack
- func (i Stack) Get(ctx context.Context, req GetRequest) (*InfoStack, error)
- func (i Stack) GetRaw(ctx context.Context, req GetRequest) ([]byte, error)
- func (i Stack) List(ctx context.Context, req ListRequest) (*ListStacks, error)
- func (i Stack) ListRaw(ctx context.Context, req ListRequest) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetRequest ¶
type GetRequest struct { // Find by ID // Required: true StackId uint64 `url:"stackId" json:"stackId" validate:"required"` }
GetRequest struct to get info of stack
type InfoStack ¶
type InfoStack struct { // CPU allocation ratio CPUAllocationRatio float64 `json:"cpu_allocation_ratio"` // Descr Descr string `json:"descr"` // Drivers Drivers []string `json:"drivers"` // ID ID uint64 `json:"id"` // Mem allocation ratio MemAllocationRatio float64 `json:"mem_allocation_ratio"` // Name Name string `json:"name"` // Status Status string `json:"status"` // Type Type string `json:"type"` }
Main information about stack
type ItemStack ¶
type ItemStack struct { // ID ID uint64 `json:"id"` // Name Name string `json:"name"` // Status Status string `json:"status"` // Type Type string `json:"type"` }
Information about stack in list
type ListRequest ¶
type ListRequest struct { // Find by ID // Required: false ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"` // Find by name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // Find by type // Required: false Type string `url:"type,omitempty" json:"type,omitempty"` // Find by status // Required: false Status string `url:"status,omitempty" json:"status,omitempty"` // Sort by one of supported fields, format +|-(field) // Required: false SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
ListRequest struct to get list of stacks
type ListStacks ¶
type ListStacks struct { //List Data []ItemStack `json:"data"` //Entry count EntryCount uint64 `json:"entryCount"` }
List of stacks
func (ListStacks) IDs ¶ added in v1.6.8
func (ls ListStacks) IDs() []uint64
IDs gets array of StackIDs from ListStacks struct
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
Structure for creating request to stack
func (Stack) List ¶
func (i Stack) List(ctx context.Context, req ListRequest) (*ListStacks, error)
List gets list of stacks as a ListStacks struct
Click to show internal directories.
Click to hide internal directories.