Documentation
¶
Index ¶
- Constants
- func GetBase(ctx context.Context) string
- func GetLogID(ctx context.Context) string
- func GetScope(ctx context.Context) map[string]any
- func ResetDefaultGroup(groups map[string]source.Group) source.Group
- func ResolveExtends(ctx context.Context, ldr ILoader, name string, value *source.Value) (*source.Value, error)
- func WithBase(ctx context.Context, base string) context.Context
- func WithExtendsLoader(ctx context.Context, fn ExtendsLoader) context.Context
- func WithLogID(ctx context.Context, logID string) context.Context
- func WithScope(ctx context.Context, scope map[string]any) context.Context
- type EmbedLoader
- type ExtendsLoader
- type ILoader
- type JSONLoader
- type SchemaTableName
Constants ¶
View Source
const ENTRY_JSON = "entry.json"
Variables ¶
This section is empty.
Functions ¶
func ResolveExtends ¶ added in v1.1.2
func ResolveExtends(ctx context.Context, ldr ILoader, name string, value *source.Value) (*source.Value, error)
ResolveExtends 运行时(DB loader)按 extra.extends 从父模型补齐物理表/索引。
func WithExtendsLoader ¶ added in v1.1.2
func WithExtendsLoader(ctx context.Context, fn ExtendsLoader) context.Context
WithExtendsLoader 注册 extends 父模型加载器(embed 场景由 entry.LoadEmbedSource 提供)。
Types ¶
type EmbedLoader ¶
type EmbedLoader struct {
JSONLoader
// contains filtered or unexported fields
}
func (*EmbedLoader) Init ¶
func (self *EmbedLoader) Init() error
type ExtendsLoader ¶ added in v1.1.2
ExtendsLoader 按 model 名加载父模型 schema(与运行时 GetSource 同源,不依赖 bundle 目录)。
func GetExtendsLoader ¶ added in v1.1.2
func GetExtendsLoader(ctx context.Context) ExtendsLoader
GetExtendsLoader 获取 extends 父模型加载器
type JSONLoader ¶
type JSONLoader struct {
// contains filtered or unexported fields
}
func (*JSONLoader) Init ¶
func (self *JSONLoader) Init() error
Click to show internal directories.
Click to hide internal directories.