Documentation ¶
Index ¶
- Constants
- func CreateOrUpdateSchema(info *Info) error
- func DeleteSchema(schemaType def.SchemaType, name string) error
- func GetAllForType(schemaType def.SchemaType) ([]string, error)
- func GetAllSchema() map[string]string
- func GetAllSchemaStatus() map[string]string
- 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 InferProtobuf(schemaFile string, messageName 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 Files
- type Info
- type Registry
Constants ¶
View Source
const BOOT_INSTALL = "$boot_install"
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdateSchema ¶
func DeleteSchema ¶
func DeleteSchema(schemaType def.SchemaType, name string) error
func GetAllForType ¶
func GetAllForType(schemaType def.SchemaType) ([]string, error)
func GetAllSchema ¶
func GetAllSchemaStatus ¶
func GetSchemaInstallScript ¶
func ImportSchema ¶
func InferFromSchemaFile ¶
func InferFromSchemaFile(schemaType string, schemaId string) (ast.StreamFields, error)
func InferProtobuf ¶
func InferProtobuf(schemaFile string, messageName string) (ast.StreamFields, error)
InferProtobuf infers the schema from a protobuf file dynamically in case the schema file changed
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 Files ¶
func GetSchemaFile ¶
func GetSchemaFile(schemaType def.SchemaType, name string) (*Files, error)
type Info ¶
type Info struct { Type def.SchemaType `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"` }
func (*Info) InstallScript ¶
Click to show internal directories.
Click to hide internal directories.