core

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

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

* * Mode * Handler for CRUD data

Variables

View Source
var (
	SchemaCore *Schema
)

Functions

func CreateField

func CreateField(schema, table, fielName, kind, defaultValue string) error

func CreateIdT

func CreateIdT(schema, table string) error

func CreateIndex

func CreateIndex(schema, table, field string) error

func CreateRecyclig

func CreateRecyclig(schema, table string) error

func DeleteMigration

func DeleteMigration(name string, version int) (Item, error)

func GetCode

func GetCode(tag, prefix string) string

func GetMarterNodeById

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

func GetMigration

func GetMigration(name string, version int) (Item, error)

* * Migrations

func GetMigrationVersion

func GetMigrationVersion(schema, name string) (int, error)

func GetMode

func GetMode() (Item, error)

func GetSerie

func GetSerie(tag string) int

Serires

func GetSerieLast

func GetSerieLast(tag string) int

func InitCore

func InitCore() error

func InitMigratios

func InitMigratios() error

func InitMode

func InitMode() error

func InitModel

func InitModel(model *Model) error

func InitRecycling

func InitRecycling() error

func InitReference

func InitReference() error

func InitSeries

func InitSeries() error

func InitSync

func InitSync() error

func JoinToMaster

func JoinToMaster() error

func SetMigration

func SetMigration(schema, name string, version int, description string, migration string) (Item, error)

func SetModeParams

func SetModeParams(mode int, driver, host string, port int, dbname, user, password string) (Item, error)

func SetReference

func SetReference(references []*ReferenceValue)

* * After reference *

func SetSerieValue

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

func SyncSeries

func SyncSeries(masterIdx int, c chan int) error

func UpSetMasterNode

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

Types

type Core

type Core struct {
	ID            string
	Mode          int
	Master        int
	InitSync      bool
	InitReference bool
	InitCore      bool
	InitSchema    bool
	InitMigratios bool
	InitSeries    bool
	InitRecycling bool
}

Jump to

Keyboard shortcuts

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