Documentation ¶
Index ¶
- Constants
- func HashModuleAsString(modules *pbsubstreams.Modules, graph *ModuleGraph, module *pbsubstreams.Module) string
- func NewTestModules() []*pbsubstreams.Module
- func PrintMermaid(mods *pbsubstreams.Modules)
- func ValidateModules(mods *pbsubstreams.Modules) error
- type Binary
- type Input
- type Manifest
- type Module
- type ModuleGraph
- func (g *ModuleGraph) AncestorStoresOf(moduleName string) ([]*pbsubstreams.Module, error)
- func (g *ModuleGraph) AncestorsOf(moduleName string) ([]*pbsubstreams.Module, error)
- func (g *ModuleGraph) GetSources() []string
- func (g *ModuleGraph) GroupedAncestorStores(moduleName string) ([][]*pbsubstreams.Module, error)
- func (g *ModuleGraph) Module(moduleName string) (*pbsubstreams.Module, error)
- func (g *ModuleGraph) ModuleInitialBlock(moduleName string) (uint64, error)
- func (g *ModuleGraph) ModulesDownTo(moduleNames []string) ([]*pbsubstreams.Module, error)
- func (g *ModuleGraph) ParentStoresOf(moduleName string) ([]*pbsubstreams.Modules, error)
- func (g *ModuleGraph) ParentsOf(moduleName string) ([]*pbsubstreams.Module, error)
- func (g *ModuleGraph) StoresDownTo(moduleNames []string) ([]*pbsubstreams.Module, error)
- func (g *ModuleGraph) TopologicalSort() ([]*pbsubstreams.Module, bool)
- type ModuleHash
- type ModuleMarshaler
- type Options
- type PackageMeta
- type Protobuf
- type Reader
- type StreamOutput
Constants ¶
View Source
const ( ModuleKindStore = "store" ModuleKindMap = "map" )
View Source
const ( UpdatePolicySet = "set" UpdatePolicySetIfNotExists = "set_if_not_exists" UpdatePolicyAdd = "add" UpdatePolicyMax = "max" UpdatePolicyMin = "min" UpdatePolicyAppend = "append" )
View Source
const PrefixSeparator = ":"
View Source
const UNSET = math.MaxUint64
Variables ¶
This section is empty.
Functions ¶
func HashModuleAsString ¶
func HashModuleAsString(modules *pbsubstreams.Modules, graph *ModuleGraph, module *pbsubstreams.Module) string
func NewTestModules ¶
func NewTestModules() []*pbsubstreams.Module
func PrintMermaid ¶
func PrintMermaid(mods *pbsubstreams.Modules)
func ValidateModules ¶
func ValidateModules(mods *pbsubstreams.Modules) error
ValidateModules is run both by the client _and_ the server.
Types ¶
type Manifest ¶
type Manifest struct { SpecVersion string `yaml:"specVersion"` // check that it equals v0.1.0 Package PackageMeta `yaml:"package"` Protobuf Protobuf `yaml:"protobuf"` Imports mapSlice `yaml:"imports"` Binaries map[string]Binary `yaml:"binaries"` Modules []*Module `yaml:"modules"` Graph *ModuleGraph `yaml:"-"` Workdir string `yaml:"-"` }
Manifest is a YAML structure used to create a Package and its list of Modules. The notion of a manifest does not live in protobuf definitions.
type Module ¶
type Module struct { Name string `yaml:"name"` Doc string `yaml:"doc"` Kind string `yaml:"kind"` InitialBlock *uint64 `yaml:"initialBlock"` UpdatePolicy string `yaml:"updatePolicy"` ValueType string `yaml:"valueType"` Binary string `yaml:"binary"` //Code Code `yaml:"code"` Inputs []*Input `yaml:"inputs"` Output StreamOutput `yaml:"output"` }
func (*Module) ToProtoWASM ¶
func (m *Module) ToProtoWASM(codeIndex uint32) (*pbsubstreams.Module, error)
type ModuleGraph ¶
func NewModuleGraph ¶
func NewModuleGraph(modules []*pbsubstreams.Module) (*ModuleGraph, error)
func (*ModuleGraph) AncestorStoresOf ¶
func (g *ModuleGraph) AncestorStoresOf(moduleName string) ([]*pbsubstreams.Module, error)
func (*ModuleGraph) AncestorsOf ¶
func (g *ModuleGraph) AncestorsOf(moduleName string) ([]*pbsubstreams.Module, error)
func (*ModuleGraph) GetSources ¶
func (g *ModuleGraph) GetSources() []string
func (*ModuleGraph) GroupedAncestorStores ¶
func (g *ModuleGraph) GroupedAncestorStores(moduleName string) ([][]*pbsubstreams.Module, error)
func (*ModuleGraph) Module ¶ added in v0.0.14
func (g *ModuleGraph) Module(moduleName string) (*pbsubstreams.Module, error)
func (*ModuleGraph) ModuleInitialBlock ¶
func (g *ModuleGraph) ModuleInitialBlock(moduleName string) (uint64, error)
func (*ModuleGraph) ModulesDownTo ¶
func (g *ModuleGraph) ModulesDownTo(moduleNames []string) ([]*pbsubstreams.Module, error)
func (*ModuleGraph) ParentStoresOf ¶
func (g *ModuleGraph) ParentStoresOf(moduleName string) ([]*pbsubstreams.Modules, error)
func (*ModuleGraph) ParentsOf ¶
func (g *ModuleGraph) ParentsOf(moduleName string) ([]*pbsubstreams.Module, error)
func (*ModuleGraph) StoresDownTo ¶
func (g *ModuleGraph) StoresDownTo(moduleNames []string) ([]*pbsubstreams.Module, error)
func (*ModuleGraph) TopologicalSort ¶
func (g *ModuleGraph) TopologicalSort() ([]*pbsubstreams.Module, bool)
type ModuleHash ¶
type ModuleHash []byte
func HashModule ¶
func HashModule(modules *pbsubstreams.Modules, module *pbsubstreams.Module, graph *ModuleGraph) ModuleHash
type ModuleMarshaler ¶
type ModuleMarshaler []*pbsubstreams.Module
func (ModuleMarshaler) MarshalJSON ¶
func (m ModuleMarshaler) MarshalJSON() ([]byte, error)
type Options ¶
func SkipSourceCodeReader ¶
func SkipSourceCodeReader() Options
type PackageMeta ¶
type StreamOutput ¶
type StreamOutput struct { // For 'map' Type string `yaml:"type"` }
Click to show internal directories.
Click to hide internal directories.