Documentation ¶
Index ¶
- func DepTools() []string
- func Generate(ctx context.Context, cacheStorage cache.Storage, appPath, protoDir string, ...) error
- func InstallDepTools(ctx context.Context, appPath string) error
- func MissingTools(f *ast.File) (missingTools []string)
- func React(path string) error
- func UnusedTools(f *ast.File) (unusedTools []string)
- func Vue(path string) error
- type ModulePathFunc
- type ModulesInPath
- type Option
- func IncludeDirs(dirs []string) Option
- func WithComposablesGeneration(out ModulePathFunc, composablesRootPath string) Option
- func WithGoGeneration(gomodPath string) Option
- func WithHooksGeneration(out ModulePathFunc, hooksRootPath string) Option
- func WithOpenAPIGeneration(out string) Option
- func WithTSClientGeneration(out ModulePathFunc, tsClientRootPath string, useCache bool) Option
- func WithVuexGeneration(out ModulePathFunc, vuexRootPath string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DepTools ¶ added in v0.25.0
func DepTools() []string
DepTools necessary tools to build and run the chain.
func Generate ¶
func Generate(ctx context.Context, cacheStorage cache.Storage, appPath, protoDir string, options ...Option) error
Generate generates code from protoDir of an SDK app residing at appPath with given options. protoDir must be relative to the projectPath.
func InstallDepTools ¶ added in v0.25.0
InstallDepTools installs protoc dependencies needed by Cosmos ecosystem.
func MissingTools ¶ added in v0.27.0
MissingTools find missing tools import indo a *ast.File.
func UnusedTools ¶ added in v0.27.0
UnusedTools find unused tools import indo a *ast.File.
Types ¶
type ModulePathFunc ¶
ModulePathFunc defines a function type that returns a path based on a Cosmos SDK module.
func ComposableModulePath ¶ added in v0.26.0
func ComposableModulePath(rootPath string) ModulePathFunc
ComposableModulePath generates useQuery hook/composable module paths for Cosmos SDK modules. The root path is used as prefix for the generated paths.
func TypescriptModulePath ¶ added in v0.24.0
func TypescriptModulePath(rootPath string) ModulePathFunc
TypescriptModulePath generates TS module paths for Cosmos SDK modules. The root path is used as prefix for the generated paths.
type ModulesInPath ¶
type Option ¶
type Option func(*generateOptions)
Option configures code generation.
func IncludeDirs ¶
IncludeDirs configures the third party proto dirs that used by app's proto. relative to the projectPath.
func WithComposablesGeneration ¶ added in v0.26.0
func WithComposablesGeneration(out ModulePathFunc, composablesRootPath string) Option
func WithGoGeneration ¶
WithGoGeneration adds Go code generation.
func WithHooksGeneration ¶ added in v0.26.0
func WithHooksGeneration(out ModulePathFunc, hooksRootPath string) Option
func WithOpenAPIGeneration ¶
WithOpenAPIGeneration adds OpenAPI spec generation.
func WithTSClientGeneration ¶ added in v0.24.0
func WithTSClientGeneration(out ModulePathFunc, tsClientRootPath string, useCache bool) Option
WithTSClientGeneration adds Typescript Client code generation. The tsClientRootPath is used to determine the root path of generated Typescript classes.
func WithVuexGeneration ¶
func WithVuexGeneration(out ModulePathFunc, vuexRootPath string) Option