xtypes

package
v0.0.0-...-8c2001a Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTenantName = "Default"
	DefaultTenant     = "default0"
	BprintBlobFolder  = "bprints"
)
View Source
const (
	UserGroupSuperAdmin = "super_admin"
	UserGroupGuest      = "guest"
)
View Source
const (
	TEMPHIA_VER_MIN = 2
	TEMPHIA_VER_MAX = 0
)

Variables

View Source
var Buildtime string = ""
View Source
var Version string = "dev"

Functions

func GetSlugGenerator

func GetSlugGenerator(length int) func() string

func PrintBuildInfo

func PrintBuildInfo()

Types

type App

type App interface {
	Run() error

	NodeId() string
	ClusterId() string
	DevMode() bool

	SingleTenant() bool
	StaticTenants() []string

	HostAddrs(privatePriIp, privateSecIps, p2p bool) []string

	GetDeps() Deps
	GetServer() Server
	GetGlobalVar() GlobalVar
	Data() DataBox
	GetMeshes() []Mesh
}

type DataBox

type DataBox interface {
	GetSchema(name string) ([]byte, error)
	GetTemplate(name string) ([]byte, error)
	GetIfaceFile(name string) ([]byte, error)

	GetAsset(atype, name string) ([]byte, error)
	AssetAdapter(atype string) fs.FS
}

type Deps

type Deps interface {
	Registry() any
	RootController() any
	ControlPlane() any
	LogService() any
	CoreHub() any
	PlugKV() any
	Cabinet() any
	DataHub() any
	EngineHub() any
	SockdHub() any
	RepoHub() any
	Extensions() any
	NodeCache() any
	Signer() any
}

type GlobalVar

type GlobalVar interface {
	Set(key string, val any)
	Get(key string) any
	Del(key string)
}

type LazyData

type LazyData interface {
	AsJsonBytes() ([]byte, error)
	AsObject(target any) error

	IsJsonBytes() bool
	IsObject() bool
	Inner() any
}

LazyData is lazyly marsheled data, it might contain references to executor inner types so it should not be stored more than its request, response duration.

type Mesh

type Mesh interface {
	Start(app App) error
	Stop() error
	GetAddress() []string
}

type Server

type Server interface {
	Listen() error
	Close() error
	BuildRoutes() error
	GetAdapterHub() any
	HandleRemote(req *remote.Request) (*remote.Response, error)
}

Jump to

Keyboard shortcuts

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