Documentation ¶
Index ¶
- Variables
- func ProtocolNames() []string
- 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 ProtoGenerator
- type Protocol
Constants ¶
This section is empty.
Variables ¶
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 ErrInvalidProtocol = fmt.Errorf("not a valid Protocol, try [%s]", strings.Join(_ProtocolNames, ", "))
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 ¶
func ProtocolNames ¶ added in v1.0.2
func ProtocolNames() []string
ProtocolNames returns a list of possible string values of Protocol.
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 ProtoGenerator ¶
type ProtoGenerator struct {
// contains filtered or unexported fields
}
func NewProtoGenerator ¶
func NewProtoGenerator(outputPath string, excludedPaths []string, generateMod bool) *ProtoGenerator
func (*ProtoGenerator) GenerateProto ¶ added in v0.1.0
func (g *ProtoGenerator) GenerateProto(pkg *pbsubstreams.Package) error
type Protocol ¶ added in v1.0.2
type Protocol uint
ENUM(
Ethereum Other
)
func ParseProtocol ¶ added in v1.0.2
ParseProtocol attempts to convert a string to a Protocol.
func (Protocol) IsValid ¶ added in v1.0.2
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (Protocol) MarshalText ¶ added in v1.0.2
MarshalText implements the text marshaller method.
func (*Protocol) UnmarshalText ¶ added in v1.0.2
UnmarshalText implements the text unmarshaller method.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.