Documentation
¶
Index ¶
- Constants
- func CreateOrUpdateSchema(info *Info) error
- func DeleteSchema(schemaType string, name string) error
- func GetAllForType(schemaType string) ([]string, error)
- func GetAllSchema() map[string]string
- func GetAllSchemaStatus() map[string]string
- func GetSchemaFile(schemaType string, name string) (*modules.Files, error)
- func GetSchemaInstallScript(key string) (string, string)
- func ImportSchema(ctx context.Context, schema map[string]string) map[string]string
- func InferFromSchemaFile(schemaType string, schemaId string) (ast.StreamFields, error)
- func InitRegistry() error
- func Register(info *Info) error
- func SchemaPartialImport(ctx context.Context, schemas map[string]string) map[string]string
- func UninstallAllSchema()
- type CustomType
- type Info
- type PbType
- type Registry
Constants ¶
View Source
const BOOT_INSTALL = "$boot_install"
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdateSchema ¶
func DeleteSchema ¶
func GetAllForType ¶
func GetAllSchema ¶
func GetAllSchemaStatus ¶
func GetSchemaFile ¶
GetSchemaFile return main schema file if schema id is defined; otherwise return the original schema id (possibly the file path)
func GetSchemaInstallScript ¶
func ImportSchema ¶
func InferFromSchemaFile ¶
func InferFromSchemaFile(schemaType string, schemaId string) (ast.StreamFields, error)
func InitRegistry ¶
func InitRegistry() error
InitRegistry initialize the registry, only called once by the server
func SchemaPartialImport ¶
SchemaPartialImport compare the schema to be installed and the one in database if not exist in database, install; if existed, ignore
func UninstallAllSchema ¶
func UninstallAllSchema()
Types ¶
type CustomType ¶ added in v2.3.0
type CustomType struct{}
func (*CustomType) Infer ¶ added in v2.3.0
func (c *CustomType) Infer(logger api.Logger, schemaId string, _ string) (ast.StreamFields, error)
type Info ¶
type Info struct {
Type string `json:"type" yaml:"type"`
Name string `json:"name" yaml:"name"`
Content string `json:"content,omitempty" yaml:"content,omitempty"`
FilePath string `json:"file,omitempty" yaml:"filePath,omitempty"`
SoPath string `json:"soFile,omitempty" yaml:"soPath,omitempty"`
Version string `json:"version,omitempty" yaml:"version,omitempty"`
}
func (*Info) InstallScript ¶
Click to show internal directories.
Click to hide internal directories.