Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPQuery ¶
type HTTPQuery struct { // Name of the RPC func. Name string // FullName of the query with service name and rpc func name. FullName string // HTTPAnnotations keeps info about http annotations of query. Rules []protoanalysis.HTTPRule }
HTTPQuery is an sdk Query.
type Module ¶
type Module struct { // Name of the module. Name string // Pkg holds the proto package info. Pkg protoanalysis.Package // Msg is a list of sdk.Msg implementation of the module. Msgs []Msg // HTTPQueries is a list of module queries. HTTPQueries []HTTPQuery // Types is a list of proto types that might be used by module. Types []Type }
Module keeps metadata about a Cosmos SDK module.
func Discover ¶
Discover discovers and returns modules and their types that implements sdk.Msg. sourcePath is the root path of an sdk blockchain.
discovery algorithm make use of proto definitions to discover modules inside the blockchain.
checking whether a type implements sdk.Msg is done by running a simple algorithm of comparing method names of each type in a package with sdk.Msg's, which satisfies our needs for the time being. for a more opinionated check:
- go/types.Implements() might be utilized and as needed.
- instead of just comparing method names, their full signatures can be compared.
Click to show internal directories.
Click to hide internal directories.