cosmoshield

package
v0.5.4 Latest Latest
Warning

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

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

Documentation

Overview

Package cosmoshield provides some utility from integrating the main `shield` package with Cosmos SDK apps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	context.Context
	// contains filtered or unexported fields
}

func NewContext

func NewContext(baseContext context.Context, actionMsg sdk.Msg) Context

func UnwrapContext

func UnwrapContext(ctx context.Context) Context

func (Context) Msg

func (c Context) Msg() sdk.Msg

type ExpanderManager

type ExpanderManager struct {
	// contains filtered or unexported fields
}

ExpanderManager implements ast.Expander and allows to register multiple NameSpaceExpanders to dispatch the expansion of identifiers based on their namespace.

func NewExpanderManager

func NewExpanderManager(expanders ...NamespaceExpander) ExpanderManager

func (ExpanderManager) Expand

func (e ExpanderManager) Expand(ctx context.Context, ident *ast.Identifier) (*ast.Expression, error)

type NamespaceExpander

type NamespaceExpander struct {
	Namespace string
	// contains filtered or unexported fields
}

NamespaceExpander is an ast.Expander that can be registered into an ExpanderManager to expand identifiers based on their namespace.

func NewPrefixedExpander

func NewPrefixedExpander(namespace string, expander ast.Expander) NamespaceExpander

func (NamespaceExpander) Expand

func (e NamespaceExpander) Expand(ctx context.Context, ident *ast.Identifier) (*ast.Expression, error)

Jump to

Keyboard shortcuts

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