Models

package
v0.0.0-...-a291660 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Apps     map[string]map[string]*App
	AppChans map[string]*AppChan
)
View Source
var (
	ConfigChans map[string]*ConfigChan
	ConfigStore map[string]map[string]map[string]interface{}
)
View Source
var (
	Products     map[string]*Product
	ProductLock  map[string]*sync.Mutex
	ProductsChan chan int
)
View Source
var (
	StatusTM statusM
	StatusT  status
)

Functions

func DeleteApp

func DeleteApp(pid string, aid string) bool

func DeleteConfig

func DeleteConfig(pid string, aid string, key string) (bool, error)

func DeleteProduct

func DeleteProduct(pid string) bool

func ExistsApp

func ExistsApp(pid string, aid string) error

func ExistsAppConfigs

func ExistsAppConfigs(pid string, aid string) error

func ExistsApps

func ExistsApps(pid string) (have bool)

func ExistsConfig

func ExistsConfig(pid string, aid string, key string) error

func ExistsProduct

func ExistsProduct(pid string) error

func ExistsProducts

func ExistsProducts() (have bool)

func GetAllApps

func GetAllApps(pid string) (maps map[string]*App)

func GetAllConfigs

func GetAllConfigs() (maps map[string]map[string]map[string]interface{})

func GetAllProducts

func GetAllProducts() (maps map[string]*Product)

func GetAppConfigs

func GetAppConfigs(pid string, aid string) (maps map[string]interface{})

func GetConfig

func GetConfig(pid string, aid string, key string) (value interface{}, err error)

func GetProductConfigs

func GetProductConfigs(pid string) (maps map[string]map[string]interface{})

func GetStatusWithMem

func GetStatusWithMem() statusM

func GetStatusWithOutMem

func GetStatusWithOutMem() status

func InitAppChan

func InitAppChan(pid string) bool

func InitConfigChan

func InitConfigChan(pid string, aid string) bool

func PutApp

func PutApp(pid string, aid string, name string, descr string) bool

func PutConfig

func PutConfig(pid string, aid string, key string, value interface{}) bool

func PutProduct

func PutProduct(pid string, name string, descr string) bool

Types

type App

type App struct {
	Name        string
	Description string
	CreateTime  int64
	UpdateTime  int64
}

func GetApp

func GetApp(pid string, aid string) (app *App, err error)

type AppChan

type AppChan struct {
	Channel chan int
	Lock    *sync.Mutex
}

type ConfigChan

type ConfigChan struct {
	Channel chan int
	Lock    *sync.Mutex
}

type Product

type Product struct {
	Name        string
	Description string
	CreateTime  int64
	UpdateTime  int64
}

func GetProduct

func GetProduct(pid string) (pro *Product, err error)

Jump to

Keyboard shortcuts

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