inst

package
v0.0.0-...-cb472e6 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	CreateInst(kit *rest.Kit, obj model.Object) Inst
}

Factory used to all inst

func New

New create a new inst factory

type Inst

type Inst interface {
	model.Operation
	GetObject() model.Object

	GetMainlineParentInst() (Inst, error)
	GetMainlineChildInst() ([]Inst, error)

	GetParentObjectWithInsts() ([]*ObjectWithInsts, error)
	GetChildObjectWithInsts() ([]*ObjectWithInsts, error)

	SetMainlineParentInst(instID int64) error
	SetMainlineChildInst(targetInst Inst) error

	GetInstID() (int64, error)
	GetParentID() (int64, error)
	GetInstName() (string, error)

	SetAssoID(id int64)
	GetAssoID() int64

	SetValue(key string, value interface{})

	SetValues(values mapstr.MapStr)

	GetValues() mapstr.MapStr

	ToMapStr() mapstr.MapStr

	IsDefault() bool

	GetBizID() (int64, error)

	CheckInstanceExists(nonInnerAttributes []model.AttributeInterface) (exist bool, filter condition.Condition, err error)
	UpdateInstance(filter condition.Condition, data mapstr.MapStr, nonInnerAttributes []model.AttributeInterface) error
}

Inst the inst interface

func CreateInst

func CreateInst(kit *rest.Kit, clientSet apimachinery.ClientSetInterface, obj model.Object, instItems []mapstr.MapStr) []Inst

CreateInst convert the inst into the Inst interface

type ObjectWithInsts

type ObjectWithInsts struct {
	Object model.Object
	Insts  []Inst
}

ObjectWithInsts the object with insts

Jump to

Keyboard shortcuts

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