Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRootPath ¶ added in v0.25.0
IsRootPath checks if a Go import path is a custom app module. Custom app modules are defined inside the "x" directory.
func RootGoImportPath ¶ added in v0.25.0
RootGoImportPath returns a Go import path with the version suffix removed.
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 // Paginated indicates that the query is using pagination. Paginated bool }
HTTPQuery is an sdk Query.
type Module ¶
type Module struct { // Name of the module. Name string // GoModulePath of the app where the module is defined. GoModulePath 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 are registered in the app chainRoot is the root path of the chain sourcePath is the root path of the go module which the proto dir is from
Discovery algorithm make use of registered modules and proto definitions to find relevant registered modules. It does so by: 1. Getting all the registered Go modules from the app. 2. Parsing the proto files to find services and messages. 3. Check if the proto services are implemented in any of the registered modules.