Documentation
¶
Overview ¶
API Actor for managing ComputeCI. This actor is a final API for admin to manage ComputeCI
Index ¶
- type ComputeCI
- type GetRequest
- type ItemComputeCI
- type ListComputeCI
- func (lci ListComputeCI) FilterByID(id uint64) ListComputeCI
- func (lci ListComputeCI) FilterByName(name string) ListComputeCI
- func (lci ListComputeCI) FilterByStatus(status string) ListComputeCI
- func (lci ListComputeCI) FilterFunc(predicate func(ItemComputeCI) bool) ListComputeCI
- func (lci ListComputeCI) FindOne() ItemComputeCI
- func (lci ListComputeCI) Serialize(params ...string) (serialization.Serialized, error)
- type ListRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComputeCI ¶
type ComputeCI struct {
// contains filtered or unexported fields
}
Structure for creating request to computeci
func (ComputeCI) Get ¶
func (c ComputeCI) Get(ctx context.Context, req GetRequest) (*ItemComputeCI, error)
Get gets information about computeci by ID
func (ComputeCI) List ¶
func (c ComputeCI) List(ctx context.Context, req ListRequest) (ListComputeCI, error)
List gets list of computeci instances
type GetRequest ¶
type GetRequest struct { // ID of the Compute CI // Required: true ComputeCIID uint64 `url:"computeciId" json:"computeciId" validate:"required"` }
Request struct for information about computeci
type ItemComputeCI ¶
type ItemComputeCI struct { // Custom fields CustomFields map[string]interface{} `json:"customFields"` // Description Description string `json:"desc"` // List drivers Drivers []string `json:"drivers"` // GUID GUID uint64 `json:"guid"` // ID ID uint64 `json:"id"` // Name Name string `json:"name"` // Status Status string `json:"status"` // Template Template string `json:"template"` }
Main information about computeci
func (ItemComputeCI) Serialize ¶
func (ic ItemComputeCI) 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 ListComputeCI ¶
type ListComputeCI []ItemComputeCI
List of computeci instances
func (ListComputeCI) FilterByID ¶
func (lci ListComputeCI) FilterByID(id uint64) ListComputeCI
FilterByID returns ListComputeCI with specified ID.
func (ListComputeCI) FilterByName ¶
func (lci ListComputeCI) FilterByName(name string) ListComputeCI
FilterByName returns ListComputeCI with specified Name.
func (ListComputeCI) FilterByStatus ¶
func (lci ListComputeCI) FilterByStatus(status string) ListComputeCI
FilterByStatus returns ListComputeCI with specified Status.
func (ListComputeCI) FilterFunc ¶
func (lci ListComputeCI) FilterFunc(predicate func(ItemComputeCI) bool) ListComputeCI
FilterFunc allows filtering ListComputeCI based on a user-specified predicate.
func (ListComputeCI) FindOne ¶
func (lci ListComputeCI) FindOne() ItemComputeCI
FindOne returns first found ItemComputeCI If none was found, returns an empty struct.
func (ListComputeCI) Serialize ¶
func (lci ListComputeCI) 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 ListRequest ¶
type ListRequest struct { // If true list deleted instances as well // Required: false IncludeDeleted bool `url:"includeDeleted,omitempty" json:"includeDeleted,omitempty"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
Request struct for get list of computeci