logics

package
Version: 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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleBaseCollectioin     = "cc_ModuleBase"
	ModuleHostCollection      = "cc_ModuleHostConfig"
	ApplicationBaseCollection = "cc_ApplicationBase"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Logics

type Logics struct {
	Instance storage.DI
}

func (*Logics) AddSingleHostModuleRelation

func (lgc *Logics) AddSingleHostModuleRelation(ec *eventclient.EventContext, hostID, moduleID, appID int64, ownerID string) (bool, error)

AddSingleHostModuleRelation add single host module relation

func (*Logics) CheckHostInIDle

func (lgc *Logics) CheckHostInIDle(appID, emptyModuleID int64, hostIDs []int64) ([]int64, []int64, error)

check if host belong to empty module

func (*Logics) CreateObject

func (lgc *Logics) CreateObject(objType string, input interface{}, idName *string) (int64, error)

func (*Logics) DelSingleHostModuleRelation

func (lgc *Logics) DelSingleHostModuleRelation(ec *eventclient.EventContext, hostID, moduleID, appID int64, ownerID string) (bool, error)

DelSingleHostModuleRelation delete single host module relation

func (*Logics) GetDefaultModuleIDs

func (lgc *Logics) GetDefaultModuleIDs(appID int64) ([]int64, error)

GetDefaultModuleIDs get default module ids

func (*Logics) GetIDleModuleID

func (lgc *Logics) GetIDleModuleID(appID int64) (int64, error)

func (*Logics) GetModuleIDsByHostID

func (lgc *Logics) GetModuleIDsByHostID(moduleCond interface{}) ([]int64, error)

GetModuleIDsByHostID get module id by hostid

func (*Logics) GetObjectByCondition

func (lgc *Logics) GetObjectByCondition(defLang language.DefaultCCLanguageIf, objType string, fields []string, condition, result interface{}, sort string, skip, limit int) error

func (*Logics) GetObjectByID

func (lgc *Logics) GetObjectByID(objType string, fields []string, id int64, result interface{}, sort string) error

func (*Logics) GetResourcePoolApp

func (lgc *Logics) GetResourcePoolApp(ownerID int64) (int64, error)

GetResourcePoolApp get resource pool app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL