inst

package
v3.0.8-alpha.10+incomp... Latest Latest
Warning

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

Go to latest
Published: May 28, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PlatID the plat id
	PlatID = "bk_cloud_id"
	// Plat the object id
	Plat = "plat"
	// BusinessID the business id
	BusinessID = "bk_biz_id"
	// BusinessNameField the business name
	BusinessNameField = "bk_biz_name"
	// InstID the common inst id
	InstID = "bk_inst_id"

	// InstName the common inst name
	InstName = "bk_inst_name"

	// SetID the set id
	SetID = "bk_set_id"

	// SetName the set name
	SetName = "bk_set_name"

	// ModuleID the module id
	ModuleID = "bk_module_id"

	// ModuleName the module name
	ModuleName = "bk_module_name"

	// PlatName the plat name
	PlatName = "bk_cloud_name"

	// DefaultLimit the limit num
	DefaultLimit = 1000
	// HostIDField the host id field
	HostIDField = "bk_host_id"
	// HostNameField the host name field
	HostNameField = "bk_host_name"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldName

type FieldName string

FieldName the field name

type Inst

type Inst interface {
	types.Saver

	GetModel() model.Model

	IsMainLine() bool

	GetAssociationModels() ([]model.Model, error)

	GetInstID() int
	GetInstName() string

	SetValue(key string, value interface{}) error
	GetValues() (types.MapStr, error)

	GetAssociationsByModleID(modleID string) ([]Inst, error)
	GetAllAssociations() (map[model.Model][]Inst, error)

	SetParent(parentInstID int) error
	GetParent() ([]Topo, error)
	GetChildren() ([]Topo, error)
}

Inst the inst interface

func CreateInst

func CreateInst(target model.Model) (Inst, error)

CreateInst creat a new inst for the model

type Iterator

type Iterator interface {
	Next() (Inst, error)
	ForEach(callbackItem func(item Inst) error) error
}

Iterator the iterator interface for the Inst

func FindInstsByCondition

func FindInstsByCondition(target model.Model, cond common.Condition) (Iterator, error)

FindInstsByCondition find all insts by condition

func FindInstsLikeName

func FindInstsLikeName(target model.Model, instName string) (Iterator, error)

FindInstsLikeName find all insts by inst name

type Topo

type Topo interface {
	Pre() Inst
	Next() Inst
}

Topo the inst topo structure

Jump to

Keyboard shortcuts

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