Documentation ¶
Index ¶
- func GenerateGuest(signatureSchema *signature.Schema, signatureHash string, packageName string) ([]byte, error)
- func GenerateHost(signatureSchema *signature.Schema, signatureHash string, packageName string) ([]byte, error)
- func GeneratePackageJSON(packageName string, packageVersion string) ([]byte, error)
- func GenerateTypes(signatureSchema *signature.Schema, packageName string) ([]byte, error)
- type Generator
- func (g *Generator) GenerateGuest(signatureSchema *signature.Schema, signatureHash string, packageName string) ([]byte, error)
- func (g *Generator) GenerateGuestTranspiled(signatureSchema *signature.Schema, packageName string, sourceName string, ...) (*Transpiled, error)
- func (g *Generator) GenerateHost(signatureSchema *signature.Schema, signatureHash string, packageName string) ([]byte, error)
- func (g *Generator) GenerateHostTranspiled(signatureSchema *signature.Schema, packageName string, sourceName string, ...) (*Transpiled, error)
- func (g *Generator) GeneratePackageJSON(packageName string, packageVersion string) ([]byte, error)
- func (g *Generator) GenerateTypes(signatureSchema *signature.Schema, packageName string) ([]byte, error)
- func (g *Generator) GenerateTypesTranspiled(signatureSchema *signature.Schema, packageName string, sourceName string, ...) (*Transpiled, error)
- type Transpiled
- func GenerateGuestTranspiled(signatureSchema *signature.Schema, signatureHash string, packageName string, ...) (*Transpiled, error)
- func GenerateHostTranspiled(signatureSchema *signature.Schema, signatureHash string, packageName string, ...) (*Transpiled, error)
- func GenerateTypesTranspiled(signatureSchema *signature.Schema, packageName string, sourceName string) (*Transpiled, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateGuest ¶
func GenerateGuest(signatureSchema *signature.Schema, signatureHash string, packageName string) ([]byte, error)
GenerateGuest generates the guest bindings for the signature
func GenerateHost ¶
func GenerateHost(signatureSchema *signature.Schema, signatureHash string, packageName string) ([]byte, error)
GenerateHost generates the host bindings for the signature
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 signature
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator is the typescript generator
func (*Generator) GenerateGuest ¶
func (g *Generator) GenerateGuest(signatureSchema *signature.Schema, signatureHash string, packageName string) ([]byte, error)
GenerateGuest generates the guest bindings for the signature
func (*Generator) GenerateGuestTranspiled ¶
func (g *Generator) GenerateGuestTranspiled(signatureSchema *signature.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(signatureSchema *signature.Schema, signatureHash string, packageName string) ([]byte, error)
GenerateHost generates the host bindings for the signature
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(signatureSchema *signature.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 signature
func (*Generator) GenerateTypes ¶
func (g *Generator) GenerateTypes(signatureSchema *signature.Schema, packageName string) ([]byte, error)
GenerateTypes generates the types for the signature
This is not transpiled to javascript and does not include source maps or type definitions
func (*Generator) GenerateTypesTranspiled ¶
func (g *Generator) GenerateTypesTranspiled(signatureSchema *signature.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(signatureSchema *signature.Schema, signatureHash string, packageName string, sourceName string) (*Transpiled, error)
GenerateGuestTranspiled generates the guest bindings and transpiles it to javascript
func GenerateHostTranspiled ¶
func GenerateHostTranspiled(signatureSchema *signature.Schema, signatureHash 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(signatureSchema *signature.Schema, packageName string, sourceName string) (*Transpiled, error)
GenerateTypesTranspiled generates the types for the signature and transpiles it to javascript