Documentation ¶
Index ¶
- func GenerateGuest(extensionSchema *extension.Schema, extensionHash string, packageName string) ([]byte, error)
- func GenerateHost(extensionSchema *extension.Schema, extensionHash string, packageName string) ([]byte, error)
- func GeneratePackageJSON(packageName string, packageVersion string) ([]byte, error)
- func GenerateTypes(extensionSchema *extension.Schema, packageName string) ([]byte, error)
- func GetCallID(schemaHash string, ifc string, fn string) uint64
- type Generator
- func (g *Generator) GenerateGuest(extensionSchema *extension.Schema, extensionHash string, packageName string) ([]byte, error)
- func (g *Generator) GenerateGuestTranspiled(extensionSchema *extension.Schema, packageName string, sourceName string, ...) (*Transpiled, error)
- func (g *Generator) GenerateHost(extensionSchema *extension.Schema, extensionHash string, packageName string) ([]byte, error)
- func (g *Generator) GenerateHostTranspiled(extensionSchema *extension.Schema, packageName string, sourceName string, ...) (*Transpiled, error)
- func (g *Generator) GeneratePackageJSON(packageName string, packageVersion string) ([]byte, error)
- func (g *Generator) GenerateTypes(extensionSchema *extension.Schema, packageName string) ([]byte, error)
- func (g *Generator) GenerateTypesTranspiled(extensionSchema *extension.Schema, packageName string, sourceName string, ...) (*Transpiled, error)
- type Transpiled
- func GenerateGuestTranspiled(extensionSchema *extension.Schema, extensionHash string, packageName string, ...) (*Transpiled, error)
- func GenerateHostTranspiled(extensionSchema *extension.Schema, extensionHash string, packageName string, ...) (*Transpiled, error)
- func GenerateTypesTranspiled(extensionSchema *extension.Schema, packageName string, sourceName string) (*Transpiled, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateGuest ¶
func GenerateGuest(extensionSchema *extension.Schema, extensionHash string, packageName string) ([]byte, error)
GenerateGuest generates the guest bindings for the extension
func GenerateHost ¶
func GenerateHost(extensionSchema *extension.Schema, extensionHash string, packageName string) ([]byte, error)
GenerateHost generates the host bindings for the extension
Note: the given schema should already be normalized, validated, and modified to have its accessors and validators disabled
func GeneratePackageJSON ¶
GeneratePackageJSON generates the package.json file for the extension
func GenerateTypes ¶
GenerateTypes generates the types for the extension
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator is the typescript generator
func (*Generator) GenerateGuest ¶
func (g *Generator) GenerateGuest(extensionSchema *extension.Schema, extensionHash string, packageName string) ([]byte, error)
GenerateGuest generates the guest bindings for the extension
func (*Generator) GenerateGuestTranspiled ¶
func (g *Generator) GenerateGuestTranspiled(extensionSchema *extension.Schema, packageName string, sourceName string, typescriptSource string) (*Transpiled, error)
GenerateGuestTranspiled takes the typescript source for the generated guest bindings and transpiles it to javascript
func (*Generator) GenerateHost ¶
func (g *Generator) GenerateHost(extensionSchema *extension.Schema, extensionHash string, packageName string) ([]byte, error)
GenerateHost generates the host bindings for the extension
Note: the given schema should already be normalized, validated, and modified to have its accessors and validators disabled
func (*Generator) GenerateHostTranspiled ¶
func (g *Generator) GenerateHostTranspiled(extensionSchema *extension.Schema, packageName string, sourceName string, typescriptSource string) (*Transpiled, error)
GenerateHostTranspiled takes the typescript source for the generated host bindings and transpiles it to javascript
Note: the given schema should already be normalized, validated, and modified to have its accessors and validators disabled
func (*Generator) GeneratePackageJSON ¶
GeneratePackageJSON generates the package.json file for the extension
func (*Generator) GenerateTypes ¶
func (g *Generator) GenerateTypes(extensionSchema *extension.Schema, packageName string) ([]byte, error)
GenerateTypes generates the types for the extension
This is not transpiled to javascript and does not include source maps or type definitions
func (*Generator) GenerateTypesTranspiled ¶
func (g *Generator) GenerateTypesTranspiled(extensionSchema *extension.Schema, packageName string, sourceName string, typescriptSource string) (*Transpiled, error)
GenerateTypesTranspiled takes the typescript source for the generated types and transpiles it to javascript
type Transpiled ¶
func GenerateGuestTranspiled ¶
func GenerateGuestTranspiled(extensionSchema *extension.Schema, extensionHash string, packageName string, sourceName string) (*Transpiled, error)
GenerateGuestTranspiled generates the guest bindings and transpiles it to javascript
func GenerateHostTranspiled ¶
func GenerateHostTranspiled(extensionSchema *extension.Schema, extensionHash string, packageName string, sourceName string) (*Transpiled, error)
GenerateHostTranspiled generates the host bindings and transpiles it to javascript
Note: the given schema should already be normalized, validated, and modified to have its accessors and validators disabled
func GenerateTypesTranspiled ¶
func GenerateTypesTranspiled(extensionSchema *extension.Schema, packageName string, sourceName string) (*Transpiled, error)
GenerateTypesTranspiled generates the types for the extension and transpiles it to javascript