types

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 12 Imported by: 33

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CoinDenomRegex is used instead of DefaultCoinDenomRegex
	// to support basket denomination and DID characters
	// TODO: remove after updating to cosmos-sdk v0.46 #857
	CoinDenomRegex = `[a-zA-Z][a-zA-Z0-9/:._-]{2,127}`
)

Functions

func AddressHash

func AddressHash(prefix string, contents []byte) []byte

func CheckDuplicateKey added in v1.1.0

func CheckDuplicateKey(d *json.Decoder, path []string) error

CheckDuplicateKey checks duplicate keys in JSON

func GogoToProtobufDuration added in v1.1.0

func GogoToProtobufDuration(d *gogotypes.Duration) *durationpb.Duration

GogoToProtobufDuration converts a gogo duration to a protobuf duration.

func GogoToProtobufTimestamp added in v1.1.0

func GogoToProtobufTimestamp(ts *gogotypes.Timestamp) *timestamppb.Timestamp

GogoToProtobufTimestamp converts a gogo timestamp to a protobuf timestamp.

func ParseDate added in v1.1.0

func ParseDate(field string, date string) (time.Time, error)

ParseDate parses a date using the format yyyy-mm-dd.

func ProtobufToGogoTimestamp added in v1.1.0

func ProtobufToGogoTimestamp(ts *timestamppb.Timestamp) *gogotypes.Timestamp

ProtobufToGogoTimestamp converts a protobuf timestamp to a gogo timestamp.

Types

type Context

type Context struct {
	sdk.Context
}

func UnwrapSDKContext

func UnwrapSDKContext(ctx context.Context) Context

func (Context) Deadline

func (c Context) Deadline() (deadline time.Time, ok bool)

func (Context) Done

func (c Context) Done() <-chan struct{}

func (Context) Err

func (c Context) Err() error

type Invoker

type Invoker func(ctx context.Context, request, response interface{}, opts ...interface{}) error

type InvokerConn

type InvokerConn interface {
	grpc.ClientConnInterface
	Invoker(methodName string) (Invoker, error)
}

type ModuleID

type ModuleID struct {
	ModuleName string
	Path       []byte
}

func (ModuleID) Address

func (m ModuleID) Address() sdk.AccAddress

Directories

Path Synopsis
Package math provides helper functions for doing mathematical calculations and parsing for the ecocredit module.
Package math provides helper functions for doing mathematical calculations and parsing for the ecocredit module.
Package server defines fixture interfaces and implementations for testing server implementations with multiple backends.
Package server defines fixture interfaces and implementations for testing server implementations with multiple backends.
cli
network
Package network implements and exposes a fully operational in-process Tendermint test network that consists of at least one or potentially many validators.
Package network implements and exposes a fully operational in-process Tendermint test network that consists of at least one or potentially many validators.

Jump to

Keyboard shortcuts

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