Documentation
¶
Overview ¶
API to manage K8CI instances
Index ¶
- type GetRequest
- type ItemK8CI
- type K8CI
- func (k K8CI) Get(ctx context.Context, req GetRequest) (*RecordK8CI, error)
- func (k K8CI) GetRaw(ctx context.Context, req GetRequest) ([]byte, error)
- func (k K8CI) List(ctx context.Context, req ListRequest) (*ListK8CI, error)
- func (k K8CI) ListDeleted(ctx context.Context, req ListDeletedRequest) (*ListK8CI, error)
- func (k K8CI) ListRaw(ctx context.Context, req ListRequest) ([]byte, error)
- type ListDeletedRequest
- type ListK8CI
- func (lkc ListK8CI) FilterByID(id uint64) ListK8CI
- func (lkc ListK8CI) FilterByName(name string) ListK8CI
- func (lkc ListK8CI) FilterFunc(predicate func(ItemK8CI) bool) ListK8CI
- func (lkc ListK8CI) FindOne() ItemK8CI
- func (lk ListK8CI) IDs() []uint64
- func (lkc ListK8CI) Serialize(params ...string) (serialization.Serialized, error)
- func (lkc ListK8CI) SortByCreatedTime(inverse bool) ListK8CI
- type ListRequest
- type RecordK8CI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetRequest ¶
type GetRequest struct { // ID of the K8 catalog item to get // Required: true K8CIID uint64 `url:"k8ciId" json:"k8ciId" validate:"required"` }
GetRequest struct to get information about K8CI
type ItemK8CI ¶
type ItemK8CI struct { // Created time CreatedTime uint64 `json:"createdTime"` // Description Description string `json:"desc"` // ID ID uint64 `json:"id"` // LB image ID LBImageID uint64 `json:"lbImageId"` // Name Name string `json:"name"` // Network plugins NetworkPlugins []string `json:"networkPlugins"` // Status Status string `json:"status"` // Version Version string `json:"version"` }
Detailed information about K8CI
func (ItemK8CI) Serialize ¶
func (ikc ItemK8CI) Serialize(params ...string) (serialization.Serialized, error)
Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.
In order to serialize with indent make sure to follow these guidelines:
- First argument -> prefix
- Second argument -> indent
type K8CI ¶
type K8CI struct {
// contains filtered or unexported fields
}
Structure for creating request to K8CI
func (K8CI) Get ¶
func (k K8CI) Get(ctx context.Context, req GetRequest) (*RecordK8CI, error)
Get gets details of the specified K8 catalog item as a RecordK8CI struct
func (K8CI) GetRaw ¶ added in v1.6.6
GetRaw gets details of the specified K8 catalog item as an array of bytes
func (K8CI) List ¶
List gets list of all k8ci catalog items available to the current user as a ListK8CI struct
func (K8CI) ListDeleted ¶
ListDeleted gets list all deleted k8ci catalog items available to the current user
type ListDeletedRequest ¶
type ListDeletedRequest struct { // Find by ID // Required: false ByID uint64 `url:"k8cId,omitempty" json:"k8cId,omitempty"` // Find by name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // Find by worker driver // Required: false WorkerDriver string `url:"workerDriver,omitempty" json:"workerDriver,omitempty"` // Find by master driver // Required: false MasterDriver string `url:"masterDriver,omitempty" json:"masterDriver,omitempty"` // Find by network plugin // Required: false NetworkPlugins string `url:"netPlugins,omitempty" json:"netPlugins,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"` }
ListDeletedRequest struct to get list information about deleted k8ci items
type ListK8CI ¶
List of K8CI
func (ListK8CI) FilterByID ¶
FilterByID returns ListK8CI with specified ID.
func (ListK8CI) FilterByName ¶
FilterByName returns ListK8CI with specified Name.
func (ListK8CI) FilterFunc ¶
FilterFunc allows filtering ListK8CI based on a user-specified predicate.
func (ListK8CI) FindOne ¶
FindOne returns first found ItemK8CI If none was found, returns an empty struct.
func (ListK8CI) Serialize ¶
func (lkc ListK8CI) Serialize(params ...string) (serialization.Serialized, error)
Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.
In order to serialize with indent make sure to follow these guidelines:
- First argument -> prefix
- Second argument -> indent
func (ListK8CI) SortByCreatedTime ¶
SortByCreatedTime sorts ListK8CI by the CreatedTime field in ascending order.
If inverse param is set to true, the order is reversed.
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 status // Required: false Status string `url:"status,omitempty" json:"status,omitempty"` // Find by worker driver // Required: false WorkerDriver string `url:"workerDriver,omitempty" json:"workerDriver,omitempty"` // Find by master driver // Required: false MasterDriver string `url:"masterDriver,omitempty" json:"masterDriver,omitempty"` // Find by network plugin // Required: false NetworkPlugins string `url:"netPlugins,omitempty" json:"netPlugins,omitempty"` // List disabled items as well // Required: false IncludeDisabled bool `url:"includeDisabled,omitempty" json:"includeDisabled,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 information about images