core

package
v0.0.74 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ModeBridge = 3 /** Bridge */
View Source
const ModeIdle = 1 /** Libre */
View Source
const ModeNode = 2 /** Node */
View Source
const ModeNone = 0 /** Node */

* * Mode * Handler for CRUD data

Variables

View Source
var (
	ModeId    string
	ModeTp    int
	MasterIdx int
)
View Source
var Collections *linq.Model
View Source
var Configs *linq.Model
View Source
var SchemaCore *linq.Schema

Functions

func AllCollections added in v0.0.34

func AllCollections(projectId, collection, state, search string, page, rows int) (e.List, error)

func ChangePassword added in v0.0.29

func ChangePassword(db int, name, password string) (bool, error)

func CreateColumn added in v0.0.29

func CreateColumn(db int, schema, table, name, kind, defaultValue string) (bool, error)

func CreateDatabase added in v0.0.29

func CreateDatabase(db int, name string) (bool, error)

* * *

func CreateIndex

func CreateIndex(db int, schema, table, field string) (bool, error)

func CreateSchema added in v0.0.29

func CreateSchema(db int, name string) (bool, error)

func CreateSerie added in v0.0.56

func CreateSerie(db int, schema, tag string) (bool, error)

func CreateUser added in v0.0.29

func CreateUser(db int, name, password string) (bool, error)

func DefineCollection added in v0.0.34

func DefineCollection() error

func DefineConfig added in v0.0.34

func DefineConfig() error

func DefineMode added in v0.0.34

func DefineMode() error

func DefineRecycling added in v0.0.34

func DefineRecycling() error

func DefineReference added in v0.0.34

func DefineReference() error

func DefineSeries added in v0.0.34

func DefineSeries() error

func DefineSync added in v0.0.34

func DefineSync() error

func DeleteCollection added in v0.0.34

func DeleteCollection(collection, id string) (e.Item, error)

func DeleteConfig added in v0.0.34

func DeleteConfig(key string) (e.Item, error)

func EnabledSeries added in v0.0.57

func EnabledSeries() bool

* * *

func ExistColum added in v0.0.29

func ExistColum(db int, schema, table, name string) (bool, error)

func ExistDatabase added in v0.0.29

func ExistDatabase(db int, name string) (bool, error)

* *

func ExistIndex added in v0.0.29

func ExistIndex(db int, schema, table, field string) (bool, error)

func ExistSchema added in v0.0.29

func ExistSchema(db int, name string) (bool, error)

func ExistSerie added in v0.0.56

func ExistSerie(db int, schema, name string) (bool, error)

func ExistTable added in v0.0.29

func ExistTable(db int, schema, name string) (bool, error)

func ExistUser added in v0.0.29

func ExistUser(db int, name string) (bool, error)

func GetCode

func GetCode(tag, prefix string) string

func GetCollectionById added in v0.0.34

func GetCollectionById(collection, id string) (e.Item, error)

* * Collection * Handler for CRUD data

func GetCollectionByIndex added in v0.0.34

func GetCollectionByIndex(collection string, idx int) (e.Item, error)

func GetConfig added in v0.0.34

func GetConfig(key string, _default string) (string, error)

func GetMarterNodeById

func GetMarterNodeById(db int, id string) (e.Item, error)

func GetMode

func GetMode() (e.Item, error)

func GetSerie

func GetSerie(tag string) int

* * *

func GetSerieLast

func GetSerieLast(tag string) int

func InitModel

func InitModel(model *linq.Model) error

func JoinToMaster

func JoinToMaster() error

func NextVal added in v0.0.56

func NextVal(tag string) int

func SetMode added in v0.0.34

func SetMode(mode int, driver, host string, port int, dbname, user, password string) (e.Item, error)

func SetRecycligTrigger added in v0.0.29

func SetRecycligTrigger(schema, table string) error

func SetReferences added in v0.0.29

func SetReferences(references []*linq.ReferenceValue)

* * After reference *

func SetSerieValue

func SetSerieValue(db int, tag string, val int) (int, error)

func SetSyncTrigger added in v0.0.29

func SetSyncTrigger(schema, table string) error

func StateCollection added in v0.0.34

func StateCollection(collection, id, state string) (e.Item, error)

func SyncSeries

func SyncSeries(masterIdx int, c chan int) error

func UpSertCollection added in v0.0.34

func UpSertCollection(collection, projectId, id string, data e.Json) (e.Item, error)

func UpSetMasterNode

func UpSetMasterNode(db int, id string, mode int, driver, host string, port int, dbname, user, password string) (e.Item, error)

func UpsertConfig added in v0.0.34

func UpsertConfig(key, value string) (e.Item, error)

Types

type Collection added in v0.0.34

type Collection struct {
	Name      string
	Id        string
	ProjectId string
	Result    e.Json
}

func GetCollection added in v0.0.34

func GetCollection(collection, id string) *Collection

func (*Collection) Int added in v0.0.34

func (c *Collection) Int(atribs ...string) int

func (*Collection) Set added in v0.0.34

func (c *Collection) Set(atrib string, val any) error

func (*Collection) Str added in v0.0.34

func (c *Collection) Str(atribs ...string) string

Jump to

Keyboard shortcuts

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