Documentation ¶
Index ¶
- Variables
- func EthereumChainNames() []string
- 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 EthereumChain
- type FunctionSignature
- type GenerationOptions
- type Generator
- type ProtoGenerator
- type Protocol
Constants ¶
This section is empty.
Variables ¶
var E_RUST_MODULE = &protoimpl.ExtensionInfo{ ExtendedType: (*descriptorpb.FileOptions)(nil), ExtensionType: (*string)(nil), Field: 56781, Name: "rust_module", Tag: "bytes", }
var ErrInvalidEthereumChain = fmt.Errorf("not a valid EthereumChain, try [%s]", strings.Join(_EthereumChainNames, ", "))
var ErrInvalidProtocol = fmt.Errorf("not a valid Protocol, try [%s]", strings.Join(_ProtocolNames, ", "))
var StoreType = map[string]string{
"bytes": "Raw",
"string": "String",
"bigint": "BigInt",
"bigdecimal": "BigDecimal",
"bigfloat": "BigDecimal",
"int64": "Int64",
"i64": "Int64",
"float64": "Float64",
"boolean": "bool",
}
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 EthereumChainNames ¶ added in v1.1.9
func EthereumChainNames() []string
EthereumChainNames returns a list of possible string values of EthereumChain.
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 EthereumChain ¶ added in v1.1.9
type EthereumChain uint
ENUM(
Mainnet BNB Polygon Goerli Mumbai Sepolia Other
)
const ( // EthereumChainMainnet is a EthereumChain of type Mainnet. EthereumChainMainnet EthereumChain = iota // EthereumChainBNB is a EthereumChain of type BNB. EthereumChainBNB // EthereumChainPolygon is a EthereumChain of type Polygon. EthereumChainPolygon // EthereumChainGoerli is a EthereumChain of type Goerli. EthereumChainGoerli // EthereumChainMumbai is a EthereumChain of type Mumbai. EthereumChainMumbai // EthereumChainSepolia is a EthereumChain of type Sepolia. EthereumChainSepolia // EthereumChainOther is a EthereumChain of type Other. EthereumChainOther )
func ParseEthereumChain ¶ added in v1.1.9
func ParseEthereumChain(name string) (EthereumChain, error)
ParseEthereumChain attempts to convert a string to a EthereumChain.
func (EthereumChain) IsValid ¶ added in v1.1.9
func (x EthereumChain) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (EthereumChain) MarshalText ¶ added in v1.1.9
func (x EthereumChain) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (EthereumChain) String ¶ added in v1.1.9
func (x EthereumChain) String() string
String implements the Stringer interface.
func (*EthereumChain) UnmarshalText ¶ added in v1.1.9
func (x *EthereumChain) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
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, showBufContent bool) 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.