basicapi

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: MPL-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertPrimitive

func ConvertPrimitive(in interface{}) (interface{}, error)

func MustConvertPrimitive

func MustConvertPrimitive(in interface{}) interface{}

Types

type Application added in v0.0.2

type Application interface {
	SpawnUseContainer(businessName string) BasicContainer
}

type BasicContainer

type BasicContainer interface {
	RegisterCustomFn(name string, fnGen FnGen) error
	AddConfigureManager(manager ConfigureManager) error

	LoadFlowModel(tomlContent string) error
	LoadMerged(content string) error

	StartContainer() error
}

type ConfigureManager

type ConfigureManager interface {
	ReplaceStaticConfigure(placeholder string) string
	ReplaceDynamicConfigure(placeholder string) string
	SupportDynamicConfigure(placeholder string) bool
}

type Ctx

type Ctx struct {
	Tracing struct {
		TraceId string
		//SpanId has two formats - 1. current-parent pair(e.g. spanId:parentSpanId)  2. tier level(e.g. lv1_seq.lv2_seq.lv3_seq)
		SpanId string
	}
}

type Fn

type Fn func(m Model) error

type FnGen

type FnGen func(params []interface{}) (Fn, error)

type FullConfigureManager added in v0.0.3

type FullConfigureManager interface {
	ConfigureManager
	Startup() error
	Stop() error
}

type Model

type Model interface {

	//AddOrUpdateField0 supports primitive value only from object and array(nested array is ok)
	AddOrUpdateField0(path []string, value interface{}) error
	//GetFieldUnsafe0 supports primitive value only from object and array(nested array is ok)
	GetFieldUnsafe0(path []string) interface{}

	ToGeneralObject() interface{}
}

Jump to

Keyboard shortcuts

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