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(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(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 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"` Name string `json:"name"` Content string `json:"content"` FilePath string `json:"file"` SoPath string `json:"soFile"` }
func (*Info) InstallScript ¶
Click to show internal directories.
Click to hide internal directories.