Documentation ¶
Index ¶
- func GetResourceIDField(resourceType iam.TypeID) string
- func GetResourceNameField(resourceType iam.TypeID) string
- type Logics
- func (lgc *Logics) FetchHostInfo(kit *rest.Kit, resourceType iam.TypeID, filter *types.FetchInstanceInfoFilter) ([]map[string]interface{}, error)
- func (lgc *Logics) FetchInstanceInfo(kit *rest.Kit, resourceType iam.TypeID, filter *types.FetchInstanceInfoFilter, ...) ([]map[string]interface{}, error)
- func (lgc *Logics) GetResourcePoolBizID(kit *rest.Kit) (int64, error)
- func (lgc *Logics) ListAttr(kit *rest.Kit, resourceType iam.TypeID) ([]types.AttrResource, error)
- func (lgc *Logics) ListAttrValue(kit *rest.Kit, resourceType iam.TypeID, filter *types.ListAttrValueFilter, ...) (*types.ListAttrValueResult, error)
- func (lgc *Logics) ListBusinessInstance(kit *rest.Kit, resourceType iam.TypeID, filter *types.ListInstanceFilter, ...) (*types.ListInstanceResult, error)
- func (lgc *Logics) ListHostByPolicy(kit *rest.Kit, resourceType iam.TypeID, ...) (*types.ListInstanceResult, error)
- func (lgc *Logics) ListHostInstance(kit *rest.Kit, resourceType iam.TypeID, filter *types.ListInstanceFilter, ...) (*types.ListInstanceResult, error)
- func (lgc *Logics) ListInstanceByPolicy(kit *rest.Kit, resourceType iam.TypeID, ...) (*types.ListInstanceResult, error)
- func (lgc *Logics) ListInstancesWithAttributes(ctx context.Context, opts *sdktypes.ListWithAttributes) ([]string, error)
- func (lgc *Logics) ListModelInstance(kit *rest.Kit, resourceType iam.TypeID, filter *types.ListInstanceFilter, ...) (*types.ListInstanceResult, error)
- func (lgc *Logics) ListSystemInstance(kit *rest.Kit, resourceType iam.TypeID, filter *types.ListInstanceFilter, ...) (*types.ListInstanceResult, error)
- func (lgc *Logics) ValidateFetchInstanceInfoRequest(kit *rest.Kit, req *types.PullResourceReq) (*types.FetchInstanceInfoFilter, error)
- func (lgc *Logics) ValidateListAttrValueRequest(kit *rest.Kit, req *types.PullResourceReq) (*types.ListAttrValueFilter, error)
- func (lgc *Logics) ValidateListInstanceByPolicyRequest(kit *rest.Kit, req *types.PullResourceReq) (*types.ListInstanceByPolicyFilter, error)
- func (lgc *Logics) ValidateListInstanceRequest(kit *rest.Kit, req *types.PullResourceReq) (*types.ListInstanceFilter, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetResourceIDField ¶
get resource id's actual field
func GetResourceNameField ¶
get resource display name's actual field
Types ¶
type Logics ¶
type Logics struct {
CoreAPI apimachinery.ClientSetInterface
}
func NewLogics ¶
func NewLogics(CoreAPI apimachinery.ClientSetInterface) *Logics
func (*Logics) FetchHostInfo ¶
func (lgc *Logics) FetchHostInfo(kit *rest.Kit, resourceType iam.TypeID, filter *types.FetchInstanceInfoFilter) ([]map[string]interface{}, error)
fetch hosts' specified attributes info using host ids
func (*Logics) FetchInstanceInfo ¶
func (lgc *Logics) FetchInstanceInfo(kit *rest.Kit, resourceType iam.TypeID, filter *types.FetchInstanceInfoFilter, extraCond map[string]interface{}) ([]map[string]interface{}, error)
fetch resource instances' specified attributes info using instance ids
func (*Logics) GetResourcePoolBizID ¶
func (*Logics) ListAttrValue ¶
func (lgc *Logics) ListAttrValue(kit *rest.Kit, resourceType iam.TypeID, filter *types.ListAttrValueFilter, page types.Page) (*types.ListAttrValueResult, error)
list enumeration attribute options of instance type resource
func (*Logics) ListBusinessInstance ¶
func (lgc *Logics) ListBusinessInstance(kit *rest.Kit, resourceType iam.TypeID, filter *types.ListInstanceFilter, page types.Page) (*types.ListInstanceResult, error)
ListBusinessInstance list business scope instances whose parent is biz, and has parent id field bk_biz_id in its data
func (*Logics) ListHostByPolicy ¶
func (lgc *Logics) ListHostByPolicy(kit *rest.Kit, resourceType iam.TypeID, filter *types.ListInstanceByPolicyFilter, page types.Page) (*types.ListInstanceResult, error)
list host instances that user is privileged to access by policy
func (*Logics) ListHostInstance ¶
func (lgc *Logics) ListHostInstance(kit *rest.Kit, resourceType iam.TypeID, filter *types.ListInstanceFilter, page types.Page) (*types.ListInstanceResult, error)
ListHostInstance list host instances
func (*Logics) ListInstanceByPolicy ¶
func (lgc *Logics) ListInstanceByPolicy(kit *rest.Kit, resourceType iam.TypeID, filter *types.ListInstanceByPolicyFilter, page types.Page, extraCond map[string]interface{}) (*types.ListInstanceResult, error)
list resource instances that user is privileged to access by policy
func (*Logics) ListInstancesWithAttributes ¶
func (lgc *Logics) ListInstancesWithAttributes(ctx context.Context, opts *sdktypes.ListWithAttributes) ([]string, error)
list resource instances that user is privileged to access by policy
func (*Logics) ListModelInstance ¶
func (lgc *Logics) ListModelInstance(kit *rest.Kit, resourceType iam.TypeID, filter *types.ListInstanceFilter, page types.Page) (*types.ListInstanceResult, error)
ListModelInstance list model instances, parent is model
func (*Logics) ListSystemInstance ¶
func (lgc *Logics) ListSystemInstance(kit *rest.Kit, resourceType iam.TypeID, filter *types.ListInstanceFilter, page types.Page, extraCond map[string]interface{}) (*types.ListInstanceResult, error)
ListSystemInstance list system scope instances that have no parent
func (*Logics) ValidateFetchInstanceInfoRequest ¶
func (lgc *Logics) ValidateFetchInstanceInfoRequest(kit *rest.Kit, req *types.PullResourceReq) (*types.FetchInstanceInfoFilter, error)
func (*Logics) ValidateListAttrValueRequest ¶
func (lgc *Logics) ValidateListAttrValueRequest(kit *rest.Kit, req *types.PullResourceReq) (*types.ListAttrValueFilter, error)
func (*Logics) ValidateListInstanceByPolicyRequest ¶
func (lgc *Logics) ValidateListInstanceByPolicyRequest(kit *rest.Kit, req *types.PullResourceReq) (*types.ListInstanceByPolicyFilter, error)
func (*Logics) ValidateListInstanceRequest ¶
func (lgc *Logics) ValidateListInstanceRequest(kit *rest.Kit, req *types.PullResourceReq) (*types.ListInstanceFilter, error)