common

package
v3.0.8-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateInstAssociation

func CreateInstAssociation(objAddr string, req *restful.Request, instAsst []*metadata.InstAsst) error

func DeleteInstAssociation

func DeleteInstAssociation(objAddr string, req *restful.Request, instID int, ownerID, objID, asstObjID string) error

func ExtractDataFromAssociationField

func ExtractDataFromAssociationField(instID int64, input map[string]interface{}, asstDes []objapi.ObjAsstDes) []*metadata.InstAsst

ExtractDataFromAssociationField get asst data

func GetUserFromHeader

func GetUserFromHeader(req *restful.Request) string

func IsSuccess

func IsSuccess(rst []byte) (*api.BKAPIRsp, bool)

IsSuccess check the response

func SearchInstAssociation

func SearchInstAssociation(objAdd string, cond map[string]interface{}, req *restful.Request) (string, error)

SearchInstAssociation search the association

func UpdateInstAssociation

func UpdateInstAssociation(objAddr string, req *restful.Request, instID int, ownerID, objID string, input map[string]interface{}) error

Types

type AsstObjectInst

type AsstObjectInst struct {
	// contains filtered or unexported fields
}

AsstObjectInst instances assocate object fields value

func NewAsstObjectInst

func NewAsstObjectInst(req *restful.Request, ownerID, objAddr string, fields map[string]*sourceAPI.ObjAttDes, defLang language.DefaultCCLanguageIf) *AsstObjectInst

NewAsstObjectInst get Asst object instnace struct, NewAsstObjectInst use handle multiple instance assocate object value

func (*AsstObjectInst) GetIDsByExcelStr

func (a *AsstObjectInst) GetIDsByExcelStr(objID, key string) (int64, error)

GetIDsByExcelStr Get a string of data based on multiple primary key values (multiple primary key values are sorted by field name, separated by ##)

func (*AsstObjectInst) GetObjAsstObjectPrimaryKey

func (a *AsstObjectInst) GetObjAsstObjectPrimaryKey() error

GetObjAsstObjectPrimaryKey get instance assocate object primary property fields

func (*AsstObjectInst) InitInstFromData

func (a *AsstObjectInst) InitInstFromData(infos map[int]map[string]interface{}) (map[int]error, error)

InitInstFromData get assocate object instance data, return map[row]error, error

func (*AsstObjectInst) SetMapFields

func (a *AsstObjectInst) SetMapFields(objID string) error

SetMapFields set import object property fields

func (*AsstObjectInst) SetObjAsstPropertyVal

func (a *AsstObjectInst) SetObjAsstPropertyVal(inst map[string]interface{}) error

SetObjAsstPropertyVal set instance assocate object value to property fields

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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