Documentation ¶
Index ¶
- Variables
- type Argument
- type Arguments
- type Engine
- func (e *Engine) FunctionSignature(module *manifest.Module) (*FunctionSignature, error)
- func (e *Engine) GetEngine() *Engine
- func (e *Engine) ModuleArgument(inputs []*manifest.Input) (Arguments, error)
- func (e *Engine) MustModule(moduleName string) *manifest.Module
- func (e *Engine) ReadableStoreDeclaration(name string, store *manifest.Module, input *manifest.Input) string
- func (e *Engine) ReadableStoreType(store *manifest.Module, input *manifest.Input) string
- func (e *Engine) WritableStoreDeclaration(store *manifest.Module) string
- func (e *Engine) WritableStoreType(store *manifest.Module) string
- type FunctionSignature
- type GenerationOptions
- type Generator
- type ProjectGenerator
- type ProjectGeneratorOption
- type ProtoGenerator
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultProjectVersion = "0.0.0"
View Source
var DefaultRustVersion = "1.60.0"
View Source
var DefaultSubstreamsVersion = "0.4.0"
View Source
var E_RUST_MODULE = &protoimpl.ExtensionInfo{ ExtendedType: (*descriptorpb.FileOptions)(nil), ExtensionType: (*string)(nil), Field: 56781, Name: "rust_module", Tag: "bytes", }
View Source
var StoreType = map[string]string{
"bytes": "Raw",
"string": "String",
"bigint": "BigInt",
"bigdecimal": "BigDecimal",
"bigfloat": "BigDecimal",
"int64": "Int64",
"i64": "Int64",
"float64": "Float64",
"boolean": "bool",
}
View Source
var UpdatePoliciesMap = map[string]string{ "": "Unset", manifest.UpdatePolicySet: "Set", manifest.UpdatePolicySetIfNotExists: "SetIfNotExists", manifest.UpdatePolicyAdd: "Add", manifest.UpdatePolicyMin: "Min", manifest.UpdatePolicyMax: "Max", manifest.UpdatePolicyAppend: "Append", }
Functions ¶
This section is empty.
Types ¶
type Engine ¶
func (*Engine) FunctionSignature ¶
func (e *Engine) FunctionSignature(module *manifest.Module) (*FunctionSignature, error)
func (*Engine) ModuleArgument ¶
func (*Engine) ReadableStoreDeclaration ¶ added in v0.1.0
func (*Engine) ReadableStoreType ¶ added in v0.1.0
func (*Engine) WritableStoreDeclaration ¶ added in v0.1.0
type FunctionSignature ¶
type FunctionSignature struct { Name string Type string OutputType string StorePolicy string Arguments Arguments }
func NewFunctionSignature ¶
type GenerationOptions ¶
type GenerationOptions func(options *generateOptions)
func WithTestWriter ¶
func WithTestWriter(w io.Writer) GenerationOptions
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func NewGenerator(pkg *pbsubstreams.Package, manifest *manifest.Manifest, protoDefinitions []*desc.FileDescriptor, srcPath string) *Generator
type ProjectGenerator ¶ added in v0.1.0
type ProjectGenerator struct { ProjectName string ProjectVersion string RustVersion string SubstreamsVersion string // contains filtered or unexported fields }
func NewProjectGenerator ¶ added in v0.1.0
func NewProjectGenerator(srcPath, projectName string, opts ...ProjectGeneratorOption) *ProjectGenerator
func (*ProjectGenerator) GenerateProject ¶ added in v0.1.0
func (g *ProjectGenerator) GenerateProject() error
type ProjectGeneratorOption ¶ added in v0.1.0
type ProjectGeneratorOption func(*ProjectGenerator)
func WithProjectVersion ¶ added in v0.1.0
func WithProjectVersion(version string) ProjectGeneratorOption
func WithRustVersion ¶ added in v0.1.0
func WithRustVersion(version string) ProjectGeneratorOption
type ProtoGenerator ¶
type ProtoGenerator struct {
// contains filtered or unexported fields
}
func NewProtoGenerator ¶
func NewProtoGenerator(outputPath string, excludedPaths []string) *ProtoGenerator
func (*ProtoGenerator) GenerateProto ¶ added in v0.1.0
func (g *ProtoGenerator) GenerateProto(pkg *pbsubstreams.Package) error
Click to show internal directories.
Click to hide internal directories.