templates

package
v20.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseFilePathFromImportPath

func ParseFilePathFromImportPath(importPath string) string

input is of form github.com/osmosis-labs/osmosis/vXX/{PATH} returns PATH

Types

type CliDescriptor

type CliDescriptor struct{}

type GrpcQuery

type GrpcQuery struct {
	QueryName string
	Response  string
}

type GrpcTemplate

type GrpcTemplate struct {
	ProtoPath     string
	ClientPath    string
	Queries       []GrpcQuery
	VersionSuffix string
}

func GrpcTemplateFromQueryYml

func GrpcTemplateFromQueryYml(queryYml QueryYml) GrpcTemplate

type Keeper

type Keeper struct {
	// e.g. github.com/osmosis-labs/osmosis/v20/x/twap
	Path string `yaml:"path"`
	// e.g. Keeper
	Struct string `yaml:"struct"`
}

type ProtoWrapperDescriptor

type ProtoWrapperDescriptor struct {
	DefaultValues map[string]string `yaml:"default_values"`
	QueryFunc     string            `yaml:"query_func"`
	Response      string            `yaml:"response"`
}

type QueryYml

type QueryYml struct {
	// Keeper struct descriptor
	Keeper Keeper `yaml:"keeper"`
	// Path to client folder e.g. "github.com/osmosis-labs/osmosis/v20/x/twap/client"
	ClientPath string `yaml:"client_path"`
	// list of all queries, key is the query name, e.g. `GetArithmeticTwap`
	Queries map[string]YmlQueryDescriptor `yaml:"queries"`
	// contains filtered or unexported fields
}

func ReadYmlFile

func ReadYmlFile(filepath string) (QueryYml, error)

type YmlQueryDescriptor

type YmlQueryDescriptor struct {
	ProtoWrapper *ProtoWrapperDescriptor `yaml:"proto_wrapper,omitempty"`
	Cli          *CliDescriptor
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL