model

package
v0.0.0-...-a92a7a0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SqliteConn *gorm.DB

Functions

func AddInstanceObserver

func AddInstanceObserver(key string, observers string) error

func InsertFactory

func InsertFactory(f Factory) error

func InsertInstance

func InsertInstance(i Instance) error

func InsertServiceRegistry

func InsertServiceRegistry(s ServiceRegistry) error

func UpdateFactory

func UpdateFactory(key string, f Factory) error

func UpdateInstance

func UpdateInstance(i Instance) error

func UpdateServiceRegistry

func UpdateServiceRegistry(key string, s ServiceRegistry) error

Types

type Factory

type Factory struct {
	Key               string `gorm:"primary_key"`
	Name              string
	Subject           string
	Description       string
	ContextDataSchema string
	ResultDataSchema  string
	Expiration        int64
	Language          string
	Definition        string
}

func GetFactory

func GetFactory(key string) (Factory, error)

func ListFactories

func ListFactories() ([]Factory, error)

type Instance

type Instance struct {
	Key         string `gorm:"primary_key"`
	State       int
	Name        string
	Subject     string
	Description string
	FactoryKey  string
	Observers   string // use `|` to split different observers
	ContextData string
	ResultData  string
	History     string
}

func GetInstance

func GetInstance(key string) (Instance, error)

func ListInstances

func ListInstances() ([]Instance, error)

type ServiceRegistry

type ServiceRegistry struct {
	Key         string
	Name        string
	Description string
	Version     string
	Status      string
}

func GetServiceRegistry

func GetServiceRegistry(key string) (ServiceRegistry, error)

Jump to

Keyboard shortcuts

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