api

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

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HostSLALevel1            = "1"
	HostSLALevel2            = "2"
	HostSLALevel3            = "3"
	HostOSTypeLinux          = "1"
	HostOSTypeWindows        = "2"
	HostImportFromExcel      = "1"
	HostImportFromAgent      = "2"
	HostImportFromAPI        = "3"
	BusinessLifeCycleTesting = "1"
	BusinessLifeCycleOnLine  = "2"
	BusinessLifeCycleStopped = "3"
	SetEnvTesting            = "1"
	SetEnvGuest              = "2"
	SetEnvNormal             = "3"
	SetServiceOpen           = "1"
	SetServiceClose          = "2"
)

Enum definition

Variables

This section is empty.

Functions

func Actions

func Actions() []httpserver.Action

Actions return the framework actions

func BaseInstOperation

func BaseInstOperation() inst.OperationInterface

BaseInstOperation return the base inst operation interface

func CreateClassification

func CreateClassification(name string) model.Classification

CreateClassification create a new classification

func CreateCommonInst

func CreateCommonInst(target model.Model) (inst.CommonInstInterface, error)

CreateCommonInst create a common inst object

func CreateCondition

func CreateCondition() common.Condition

CreateCondition create a condition object

func FindClassificationsByCondition

func FindClassificationsByCondition(cond common.Condition) (model.ClassificationIterator, error)

FindClassificationsByCondition find a array of the classification by the condition

func FindClassificationsByConditionWithOwner

func FindClassificationsByConditionWithOwner(supplierAccount string, cond common.Condition) (model.ClassificationIterator, error)

FindClassificationsByConditionWithOwner find a array of the classification by the condition

func FindClassificationsLikeName

func FindClassificationsLikeName(name string) (model.ClassificationIterator, error)

FindClassificationsLikeName find a array of the classification by the name

func FindClassificationsLikeNameWithOwner

func FindClassificationsLikeNameWithOwner(supplierAccount, name string) (model.ClassificationIterator, error)

FindClassificationsLikeNameWithOwner find a array of the classification by the name

func FindInstsByCondition

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

FindInstsByCondition find all insts by the condition

func FindInstsLikeName

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

FindInstsLikeName find all insts by the name

func GetBusinessModel

func GetBusinessModel(supplierAccount string) (model.Model, error)

GetBusinessModel return a Business object

func GetHostModel

func GetHostModel(supplierAccount string) (model.Model, error)

GetHostModel get a host object

func GetModel

func GetModel(supplierAccount, classificationID, objID string) (model.Model, error)

GetModel get the model

func GetModuleModel

func GetModuleModel(supplierAccount string) (model.Model, error)

GetModuleModel get a module object

func GetPlatID

func GetPlatID(supplierAccount, platName string) (int64, error)

GetPlatID get the plat id

func GetPlatModel

func GetPlatModel(supplierAccount string) (model.Model, error)

GetPlatModel return a plat object

func GetSetModel

func GetSetModel(supplierAccount string) (model.Model, error)

GetSetModel get a set object

func Init

func Init()

Init init the framework

func RegisterEventBusiness

func RegisterEventBusiness(eventFunc types.EventCallbackFunc) types.EventKey

RegisterEventBusiness register business event

func RegisterEventHost

func RegisterEventHost(eventFunc types.EventCallbackFunc) types.EventKey

RegisterEventHost register host event

func RegisterEventHostIdentifier

func RegisterEventHostIdentifier(eventFunc types.EventCallbackFunc) types.EventKey

RegisterEventHostIdentifier register host identifier event

func RegisterEventInst

func RegisterEventInst(eventFunc types.EventCallbackFunc) types.EventKey

RegisterEventInst register host inst event

func RegisterEventModule

func RegisterEventModule(eventFunc types.EventCallbackFunc) types.EventKey

RegisterEventModule register business event

func RegisterEventModuleTransfer

func RegisterEventModuleTransfer(eventFunc types.EventCallbackFunc) types.EventKey

RegisterEventModuleTransfer register module transfer event

func RegisterEventSet

func RegisterEventSet(eventFunc types.EventCallbackFunc) types.EventKey

RegisterEventSet register host set event

func RegisterFrequencyInputer

func RegisterFrequencyInputer(inputer input.Inputer, frequency time.Duration)

RegisterFrequencyInputer execute a non-blocking timing inputer, only execute once

func RegisterInputer

func RegisterInputer(inputer input.Inputer)

RegisterInputer register a inputer, only execute once

func UnInit

func UnInit() error

UnInit destory the framework

func UnRegisterEvent

func UnRegisterEvent(eventKey types.EventKey)

UnRegisterEvent unregister event

Types

type BusinessIteratorWrapper

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

BusinessIteratorWrapper the business iterator wrapper

func FindBusinessByCondition

func FindBusinessByCondition(supplierAccount string, cond common.Condition) (*BusinessIteratorWrapper, error)

FindBusinessByCondition find all insts by the condition

func FindBusinessLikeName

func FindBusinessLikeName(supplierAccount, businessName string) (*BusinessIteratorWrapper, error)

FindBusinessLikeName find all insts by the name

func (*BusinessIteratorWrapper) ForEach

func (cli *BusinessIteratorWrapper) ForEach(callback func(business *BusinessWrapper) error) error

ForEach the foreach function

func (*BusinessIteratorWrapper) Next

Next next the business

type BusinessWrapper

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

BusinessWrapper the business wrapper

func CreateBusiness

func CreateBusiness(supplierAccount string) (*BusinessWrapper, error)

CreateBusiness create a new Business object

func (*BusinessWrapper) Create

func (cli *BusinessWrapper) Create() error

Create only to create

func (*BusinessWrapper) GetBusinessID

func (cli *BusinessWrapper) GetBusinessID() (int64, error)

GetBusinessID get the id for the business

func (*BusinessWrapper) GetDeveloper

func (cli *BusinessWrapper) GetDeveloper() (string, error)

GetDeveloper get the developer name

func (*BusinessWrapper) GetLifeCycle

func (cli *BusinessWrapper) GetLifeCycle() (string, error)

GetLifeCycle get the life cycle

func (*BusinessWrapper) GetMaintainer

func (cli *BusinessWrapper) GetMaintainer() (string, error)

GetMaintainer get the maintaner name

func (*BusinessWrapper) GetModel

func (cli *BusinessWrapper) GetModel() model.Model

GetModel get the model for the business

func (*BusinessWrapper) GetName

func (cli *BusinessWrapper) GetName() (string, error)

GetName get the business name

func (*BusinessWrapper) GetOperator

func (cli *BusinessWrapper) GetOperator() (string, error)

GetOperator get the operator

func (*BusinessWrapper) GetProductor

func (cli *BusinessWrapper) GetProductor() (string, error)

GetProductor get the productor for the business

func (*BusinessWrapper) GetTester

func (cli *BusinessWrapper) GetTester() (string, error)

GetTester get the tester name

func (*BusinessWrapper) GetValues

func (cli *BusinessWrapper) GetValues() (types.MapStr, error)

GetValues return the values

func (*BusinessWrapper) IsExists

func (cli *BusinessWrapper) IsExists() (bool, error)

IsExists check the set

func (*BusinessWrapper) Save

func (cli *BusinessWrapper) Save() error

Save save the data

func (*BusinessWrapper) SetDeveloper

func (cli *BusinessWrapper) SetDeveloper(developer string) error

SetDeveloper set the biz developer

func (*BusinessWrapper) SetLifeCycle

func (cli *BusinessWrapper) SetLifeCycle(lifeCycle string) error

SetLifeCycle set the life cycle

func (*BusinessWrapper) SetMaintainer

func (cli *BusinessWrapper) SetMaintainer(maintainer string) error

SetMaintainer set the maintainer for the biz

func (*BusinessWrapper) SetName

func (cli *BusinessWrapper) SetName(name string) error

SetName set the business name

func (*BusinessWrapper) SetOperator

func (cli *BusinessWrapper) SetOperator(operator string) error

SetOperator set the operator

func (*BusinessWrapper) SetProductor

func (cli *BusinessWrapper) SetProductor(productor string) error

SetProductor set the productor name

func (*BusinessWrapper) SetTester

func (cli *BusinessWrapper) SetTester(tester string) error

SetTester set the tester name

func (*BusinessWrapper) SetValue

func (cli *BusinessWrapper) SetValue(key string, val interface{}) error

SetValue set the key value

func (*BusinessWrapper) Update

func (cli *BusinessWrapper) Update() error

Update only to update

type FinderHostWrapper

type FinderHostWrapper struct {
	*HostWrapper
	// contains filtered or unexported fields
}

FinderHostWrapper find the host wrapper

func (*FinderHostWrapper) GetBizs

func (cli *FinderHostWrapper) GetBizs() ([]*BusinessWrapper, error)

GetBizs return all business for the host

func (*FinderHostWrapper) GetModules

func (cli *FinderHostWrapper) GetModules() ([]*ModuleWrapper, error)

GetModules return all modules for the module

func (*FinderHostWrapper) GetSets

func (cli *FinderHostWrapper) GetSets() ([]*SetWrapper, error)

GetSets return all sets for the host

type HostIteratorWrapper

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

HostIteratorWrapper the host iterator wrapper

func FindHostByCondition

func FindHostByCondition(supplierAccount string, cond common.Condition) (*HostIteratorWrapper, error)

FindHostByCondition find all insts by the condition

func FindHostLikeName

func FindHostLikeName(supplierAccount, hostName string) (*HostIteratorWrapper, error)

FindHostLikeName find all insts by the name

func (*HostIteratorWrapper) ForEach

func (cli *HostIteratorWrapper) ForEach(callback func(host *FinderHostWrapper) error) error

ForEach the foreach function

func (*HostIteratorWrapper) Next

func (cli *HostIteratorWrapper) Next() (*HostWrapper, error)

Next next the business

type HostModuleActionType

type HostModuleActionType string
const (
	HostAppendModule  HostModuleActionType = "append"
	HostReplaceModule HostModuleActionType = "replace"
)

type HostWrapper

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

HostWrapper the host wrapper

func CreateHost

func CreateHost(supplierAccount string) (*HostWrapper, error)

CreateHost create a new host object

func (*HostWrapper) Create

func (cli *HostWrapper) Create() error

Create only to create

func (*HostWrapper) GetAssetID

func (cli *HostWrapper) GetAssetID() (string, error)

GetAssetID get the asset id for the host

func (*HostWrapper) GetBakOperator

func (cli *HostWrapper) GetBakOperator() (string, error)

GetBakOperator get the bak operator

func (*HostWrapper) GetCPU

func (cli *HostWrapper) GetCPU() (int, error)

GetCPU get the cpu core num

func (*HostWrapper) GetCPUMhz

func (cli *HostWrapper) GetCPUMhz() (int, error)

GetCPUMhz get the cpu mhz

func (*HostWrapper) GetCPUModule

func (cli *HostWrapper) GetCPUModule() (string, error)

GetCPUModule get the cpu module

func (*HostWrapper) GetCloudID

func (cli *HostWrapper) GetCloudID() (int, error)

GetCloudID get the cloudid

func (*HostWrapper) GetComment

func (cli *HostWrapper) GetComment() (string, error)

GetComment get the comment for the host

func (*HostWrapper) GetDisk

func (cli *HostWrapper) GetDisk() (int, error)

GetDisk get the disk

func (*HostWrapper) GetInnerIP

func (cli *HostWrapper) GetInnerIP() (string, error)

GetInnerIP get the inner ip

func (*HostWrapper) GetInnerMac

func (cli *HostWrapper) GetInnerMac() (string, error)

GetInnerMac get the mac for the host

func (*HostWrapper) GetMem

func (cli *HostWrapper) GetMem() (int, error)

GetMem get the mem for the host

func (*HostWrapper) GetModel

func (cli *HostWrapper) GetModel() model.Model

GetModel get the model for the host

func (*HostWrapper) GetName

func (cli *HostWrapper) GetName() (string, error)

GetName get the host name

func (*HostWrapper) GetOperator

func (cli *HostWrapper) GetOperator() (string, error)

GetOperator get the operator

func (*HostWrapper) GetOsBit

func (cli *HostWrapper) GetOsBit() (string, error)

GetOsBit get the os bit

func (*HostWrapper) GetOsName

func (cli *HostWrapper) GetOsName() (string, error)

GetOsName get the os name

func (*HostWrapper) GetOsType

func (cli *HostWrapper) GetOsType() (string, error)

GetOsType get the os type

func (*HostWrapper) GetOsVersion

func (cli *HostWrapper) GetOsVersion() (string, error)

GetOsVersion get the os version

func (*HostWrapper) GetOuterIP

func (cli *HostWrapper) GetOuterIP() (string, error)

GetOuterIP get the outerip

func (*HostWrapper) GetOuterMac

func (cli *HostWrapper) GetOuterMac() (string, error)

GetOuterMac get the mac for the host

func (*HostWrapper) GetSLA

func (cli *HostWrapper) GetSLA() (string, error)

GetSLA get sla

func (*HostWrapper) GetSN

func (cli *HostWrapper) GetSN() (string, error)

GetSN get the sn for the host

func (*HostWrapper) GetServiceTerm

func (cli *HostWrapper) GetServiceTerm() (int, error)

GetServiceTerm get the service term

func (*HostWrapper) GetValues

func (cli *HostWrapper) GetValues() (types.MapStr, error)

GetValues return the values

func (*HostWrapper) IsExists

func (cli *HostWrapper) IsExists() (bool, error)

IsExists check the set

func (*HostWrapper) Save

func (cli *HostWrapper) Save() error

Save save the data

func (*HostWrapper) SetAssetID

func (cli *HostWrapper) SetAssetID(assetID string) error

SetAssetID set the assetid for the host

func (*HostWrapper) SetBakOperator

func (cli *HostWrapper) SetBakOperator(bakOperator string) error

SetBakOperator set the bak operator

func (*HostWrapper) SetBusiness

func (cli *HostWrapper) SetBusiness(bizID int64)

SetBusiness set the business id for the host

func (*HostWrapper) SetCPU

func (cli *HostWrapper) SetCPU(cpu int64) error

SetCPU set the cpu core num for the host

func (*HostWrapper) SetCPUMhz

func (cli *HostWrapper) SetCPUMhz(cpuMhz int64) error

SetCPUMhz set the cpu mhz

func (*HostWrapper) SetCPUModule

func (cli *HostWrapper) SetCPUModule(cpuModule string) error

SetCPUModule set the cpu module for the host

func (*HostWrapper) SetCloudID

func (cli *HostWrapper) SetCloudID(cloudID int64) error

SetCloudID set the cloudid for the host

func (*HostWrapper) SetComment

func (cli *HostWrapper) SetComment(comment string) error

SetComment set the comment for the host

func (*HostWrapper) SetDisk

func (cli *HostWrapper) SetDisk(disk int64) error

SetDisk set the capacity of the disk for the host

func (*HostWrapper) SetInnerIP

func (cli *HostWrapper) SetInnerIP(innerIP string) error

SetInnerIP set the inner ip

func (*HostWrapper) SetInnerMac

func (cli *HostWrapper) SetInnerMac(mac string) error

SetInnerMac set the mac for the host

func (*HostWrapper) SetMem

func (cli *HostWrapper) SetMem(mem int64) error

SetMem set the mem for the host

func (*HostWrapper) SetModuleIDS

func (cli *HostWrapper) SetModuleIDS(moduleIDS []int64, act HostModuleActionType) error

SetModuleIDS set the modules

func (*HostWrapper) SetName

func (cli *HostWrapper) SetName(hostName string) error

SetName set the host name for the host

func (*HostWrapper) SetOperator

func (cli *HostWrapper) SetOperator(operator string) error

SetOperator set the operator for the host

func (*HostWrapper) SetOsBit

func (cli *HostWrapper) SetOsBit(osbit string) error

SetOsBit set the os bit

func (*HostWrapper) SetOsName

func (cli *HostWrapper) SetOsName(osName string) error

SetOsName set the os name for the host

func (*HostWrapper) SetOsType

func (cli *HostWrapper) SetOsType(osType string) error

SetOsType set the os type for the host

func (*HostWrapper) SetOsVersion

func (cli *HostWrapper) SetOsVersion(osVersion string) error

SetOsVersion set the os version for the host

func (*HostWrapper) SetOuterIP

func (cli *HostWrapper) SetOuterIP(outerIP string) error

SetOuterIP set the outer ip for the host

func (*HostWrapper) SetOuterMac

func (cli *HostWrapper) SetOuterMac(mac string) error

SetOuterMac set the mac for the host

func (*HostWrapper) SetSLA

func (cli *HostWrapper) SetSLA(sla string) error

SetSLA set the sla

func (*HostWrapper) SetSN

func (cli *HostWrapper) SetSN(sn string) error

SetSN set the sn for the host

func (*HostWrapper) SetServiceTerm

func (cli *HostWrapper) SetServiceTerm(serviceTerm int64) error

SetServiceTerm set the service term for the host

func (*HostWrapper) SetTopo

func (cli *HostWrapper) SetTopo(bizID int64, setName, moduleName string, act HostModuleActionType) error

SetTopo set the host topo

func (*HostWrapper) SetValue

func (cli *HostWrapper) SetValue(key string, val interface{}) error

SetValue set the key value

func (*HostWrapper) Transfer

func (cli *HostWrapper) Transfer() inst.TransferInterface

Transfer transfer operation

func (*HostWrapper) Update

func (cli *HostWrapper) Update() error

Update only to update

type ModuleIteratorWrapper

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

ModuleIteratorWrapper the module iterator wrapper

func FindModuleByCondition

func FindModuleByCondition(supplierAccount string, cond common.Condition) (*ModuleIteratorWrapper, error)

FindModuleByCondition find all insts by the condition

func FindModuleLikeName

func FindModuleLikeName(supplierAccount, moduleName string) (*ModuleIteratorWrapper, error)

FindModuleLikeName find all insts by the name

func (*ModuleIteratorWrapper) ForEach

func (cli *ModuleIteratorWrapper) ForEach(callback func(module *ModuleWrapper) error) error

ForEach the foreach function

func (*ModuleIteratorWrapper) Next

func (cli *ModuleIteratorWrapper) Next() (*ModuleWrapper, error)

Next next the module

type ModuleWrapper

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

ModuleWrapper the module wrapper

func CreateModule

func CreateModule(supplierAccount string) (*ModuleWrapper, error)

CreateModule create a new module object

func (*ModuleWrapper) Create

func (cli *ModuleWrapper) Create() error

Create only to create

func (*ModuleWrapper) GetBakOperator

func (cli *ModuleWrapper) GetBakOperator() (string, error)

GetBakOperator get the bak operator

func (*ModuleWrapper) GetBusinessID

func (cli *ModuleWrapper) GetBusinessID() (int, error)

GetBusinessID get the business id

func (*ModuleWrapper) GetID

func (cli *ModuleWrapper) GetID() (int64, error)

GetID get the id for the host

func (*ModuleWrapper) GetModel

func (cli *ModuleWrapper) GetModel() model.Model

GetModel get the model for the module

func (*ModuleWrapper) GetModuleID

func (cli *ModuleWrapper) GetModuleID() (int64, error)

GetModuleID get the id for the module

func (*ModuleWrapper) GetName

func (cli *ModuleWrapper) GetName() (string, error)

GetName get the module name

func (*ModuleWrapper) GetOperator

func (cli *ModuleWrapper) GetOperator() (string, error)

GetOperator get the operator for the host

func (*ModuleWrapper) GetSupplierAccount

func (cli *ModuleWrapper) GetSupplierAccount() (string, error)

GetSupplierAccount get the supplier account

func (*ModuleWrapper) GetValues

func (cli *ModuleWrapper) GetValues() (types.MapStr, error)

GetValues return the values

func (*ModuleWrapper) IsExists

func (cli *ModuleWrapper) IsExists() (bool, error)

IsExists check the set

func (*ModuleWrapper) Save

func (cli *ModuleWrapper) Save() error

Save save the data

func (*ModuleWrapper) SetBakOperator

func (cli *ModuleWrapper) SetBakOperator(bakOperator string) error

SetBakOperator set the bak operator

func (*ModuleWrapper) SetName

func (cli *ModuleWrapper) SetName(name string) error

SetName set the module name

func (*ModuleWrapper) SetOperator

func (cli *ModuleWrapper) SetOperator(operator string) error

SetOperator set the operator

func (*ModuleWrapper) SetSupplierAccount

func (cli *ModuleWrapper) SetSupplierAccount(supplierAccount string) error

SetSupplierAccount set the supplier account

func (*ModuleWrapper) SetTopo

func (cli *ModuleWrapper) SetTopo(bizID, setID int64) error

SetTopo set the parent inst

func (*ModuleWrapper) SetValue

func (cli *ModuleWrapper) SetValue(key string, val interface{}) error

SetValue set the key value

func (*ModuleWrapper) Update

func (cli *ModuleWrapper) Update() error

Update only to update

type PlatIteratorWrapper

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

PlatIteratorWrapper the plat iterator wrapper

func FindPlatByCondition

func FindPlatByCondition(supplierAccount string, cond common.Condition) (*PlatIteratorWrapper, error)

FindPlatByCondition find all insts by the condition

func FindPlatLikeName

func FindPlatLikeName(supplierAccount, platName string) (*PlatIteratorWrapper, error)

FindPlatLikeName find all insts by the name

func (*PlatIteratorWrapper) ForEach

func (cli *PlatIteratorWrapper) ForEach(callback func(plat *PlatWrapper) error) error

ForEach the foreach function

func (*PlatIteratorWrapper) Next

func (cli *PlatIteratorWrapper) Next() (*PlatWrapper, error)

Next next the plat

type PlatWrapper

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

PlatWrapper the plat wrapper

func CreatePlat

func CreatePlat(supplierAccount string) (*PlatWrapper, error)

CreatePlat create a new plat object

func (*PlatWrapper) Create

func (cli *PlatWrapper) Create() error

Create only to create

func (*PlatWrapper) GetID

func (cli *PlatWrapper) GetID() (int, error)

GetID get the set id

func (*PlatWrapper) GetModel

func (cli *PlatWrapper) GetModel() model.Model

GetModel get the model for the plat

func (*PlatWrapper) GetName

func (cli *PlatWrapper) GetName() (string, error)

GetName get the set name

func (*PlatWrapper) GetSupplierAccount

func (cli *PlatWrapper) GetSupplierAccount() (string, error)

GetSupplierAccount get the supplier account

func (*PlatWrapper) GetValues

func (cli *PlatWrapper) GetValues() (types.MapStr, error)

GetValues return the values

func (*PlatWrapper) IsExists

func (cli *PlatWrapper) IsExists() (bool, error)

IsExists check the set

func (*PlatWrapper) Save

func (cli *PlatWrapper) Save() error

Save save the data

func (*PlatWrapper) SetName

func (cli *PlatWrapper) SetName(name string) error

SetName the name of the set

func (*PlatWrapper) SetSupplierAccount

func (cli *PlatWrapper) SetSupplierAccount(supplierAccount string) error

SetSupplierAccount set the supplier account code of the set

func (*PlatWrapper) SetValue

func (cli *PlatWrapper) SetValue(key string, val interface{}) error

SetValue set the key value

func (*PlatWrapper) Update

func (cli *PlatWrapper) Update() error

Update only to update

type SetIteratorWrapper

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

SetIteratorWrapper the set iterator wrapper

func FindSetByCondition

func FindSetByCondition(supplierAccount string, cond common.Condition) (*SetIteratorWrapper, error)

FindSetByCondition find all insts by the condition

func FindSetLikeName

func FindSetLikeName(supplierAccount, setName string) (*SetIteratorWrapper, error)

FindSetLikeName find all insts by the name

func (*SetIteratorWrapper) ForEach

func (cli *SetIteratorWrapper) ForEach(callback func(set *SetWrapper) error) error

ForEach the foreach function

func (*SetIteratorWrapper) Next

func (cli *SetIteratorWrapper) Next() (*SetWrapper, error)

Next next the set

type SetWrapper

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

SetWrapper the set wrapper

func CreateSet

func CreateSet(supplierAccount string) (*SetWrapper, error)

CreateSet create a new set object

func (*SetWrapper) Create

func (cli *SetWrapper) Create() error

Create only to create

func (*SetWrapper) GetBusinessID

func (cli *SetWrapper) GetBusinessID() (int64, error)

GetBusinessID get the business id

func (*SetWrapper) GetCapacity

func (cli *SetWrapper) GetCapacity() (int, error)

GetCapacity get the capacity

func (*SetWrapper) GetEnv

func (cli *SetWrapper) GetEnv() (string, error)

GetEnv get the env

func (*SetWrapper) GetID

func (cli *SetWrapper) GetID() (int64, error)

GetID get the set id

func (*SetWrapper) GetModel

func (cli *SetWrapper) GetModel() model.Model

GetModel get the model for the set

func (*SetWrapper) GetName

func (cli *SetWrapper) GetName() (string, error)

GetName get the set name

func (*SetWrapper) GetServiceStatus

func (cli *SetWrapper) GetServiceStatus() (string, error)

GetServiceStatus get the service status

func (*SetWrapper) GetSetID

func (cli *SetWrapper) GetSetID() (int64, error)

GetSetID get the id for the set

func (*SetWrapper) GetSupplierAccount

func (cli *SetWrapper) GetSupplierAccount() (string, error)

GetSupplierAccount get the supplier account

func (*SetWrapper) GetValues

func (cli *SetWrapper) GetValues() (types.MapStr, error)

GetValues return the values

func (*SetWrapper) IsExists

func (cli *SetWrapper) IsExists() (bool, error)

IsExists check the set

func (*SetWrapper) Save

func (cli *SetWrapper) Save() error

Save save the data

func (*SetWrapper) SetBusinessID

func (cli *SetWrapper) SetBusinessID(businessID int64) error

SetBusinessID set the business id of the set

func (*SetWrapper) SetCapacity

func (cli *SetWrapper) SetCapacity(capacity int64) error

SetCapacity set the capacity of the set

func (*SetWrapper) SetDescription

func (cli *SetWrapper) SetDescription(intro string) error

SetDescription set the introducrtion of the set

func (*SetWrapper) SetEnv

func (cli *SetWrapper) SetEnv(env string) error

SetEnv set the env of the set

func (*SetWrapper) SetMark

func (cli *SetWrapper) SetMark(desc string) error

SetMark set the mark of the set

func (*SetWrapper) SetName

func (cli *SetWrapper) SetName(name string) error

SetName the name of the set

func (*SetWrapper) SetParent

func (cli *SetWrapper) SetParent(parentInstID int64) error

SetParent set the parent id of the set

func (*SetWrapper) SetServiceStatus

func (cli *SetWrapper) SetServiceStatus(status string) error

SetServiceStatus the service status of the set

func (*SetWrapper) SetSupplierAccount

func (cli *SetWrapper) SetSupplierAccount(supplierAccount string) error

SetSupplierAccount set the supplier account code of the set

func (*SetWrapper) SetValue

func (cli *SetWrapper) SetValue(key string, val interface{}) error

SetValue set the key value

func (*SetWrapper) Update

func (cli *SetWrapper) Update() error

Update only to update

Jump to

Keyboard shortcuts

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