Documentation ¶
Index ¶
- Constants
- Variables
- func FmtBlockID(owner *sdk.AccAddress, dseq *uint64, gseq *uint32, oseq *uint32, ...) string
- func GetAccAddress(attrs []sdk.Attribute, key string) (sdk.AccAddress, error)
- func GetString(attrs []sdk.Attribute, key string) (string, error)
- func GetUint64(attrs []sdk.Attribute, key string) (uint64, error)
- func RenderQueryResponse(cdc *codec.Codec, obj interface{}) ([]byte, error)
- type BaseModuleEvent
- type BlockID
- type Event
- type ModuleEvent
Constants ¶
const (
// EventTypeMessage defines the Akash message string
EventTypeMessage = akashEventMessageV1
)
Variables ¶
var ( // ErrNotFound is the error with message "Not found" ErrNotFound = errors.New("Not found") // ErrUnknownType is the error with message "Unknown type" ErrUnknownType = errors.New("Unknown type") // ErrUnknownModule is the error with message "Unknown module" ErrUnknownModule = errors.New("Unknown module") // ErrUnknownAction is the error with message "Unknown action" ErrUnknownAction = errors.New("Unknown action") // ErrParsingBlockID indicates one of the uint parsers failed to convert a value. ErrParsingBlockID = errors.New("error parsing block id values") // ErrInvalidParseBlockIDInput indicates the splitting of block path failed. ErrInvalidParseBlockIDInput = errors.New("error parsing block id input string") )
var ( // ErrCouldNotRenderObject indicates response rendering error. ErrCouldNotRenderObject = sdkerrors.New("sdkutil", 1, "could not render object") )
Functions ¶
func FmtBlockID ¶ added in v0.7.8
func FmtBlockID(owner *sdk.AccAddress, dseq *uint64, gseq *uint32, oseq *uint32, provider *sdk.AccAddress) string
FmtBlockID provides a human readable representation of the block chain ID fields.
func GetAccAddress ¶
GetAccAddress take sdk attributes, key and returns account address. Returns error incase of failure.
func GetString ¶
GetString take sdk attributes, key and returns key value. Returns error incase of failure.
Types ¶
type BaseModuleEvent ¶ added in v0.7.5
type BlockID ¶ added in v0.7.8
type BlockID struct { Owner *sdk.AccAddress DSeq *uint64 GSeq *uint32 OSeq *uint32 Provider *sdk.AccAddress }
BlockID provides type to properly format print blockchain ID types.
func NewBlockID ¶ added in v0.7.8
func NewBlockID(owner *sdk.AccAddress, dseq *uint64, gseq *uint32, oseq *uint32, provider *sdk.AccAddress) BlockID
NewBlockID initializes the BlockID struct, passing nil values is acceptable for fields which are not used.
func ParseBlockID ¶ added in v0.7.8
ParseBlockID returns the values from a human readable ID string.
func ReflectBlockID ¶ added in v0.7.8
func ReflectBlockID(id interface{}) BlockID
ReflectBlockID accepts an ID struct and unpacks the block identifying fields. Useful for passing *ID types and getting consistent output based on the consistent field names.
func (BlockID) String ¶ added in v0.7.8
String method provides the full formating of all the BlockID fields which are not nil. Format: [Owner AccAddress]/[DSeq]/[GSeq]/[OSeq]/[Provider AccAddress] eg: akash1vgv30hr8lel8r7270wywmak5c82es3njws3u4z/795423625/1/1/akash1pxqksfr60zc6uadht6300uavwl3s58ct0apt9w
type Event ¶
Event stores type, module, action and attributes list of sdk
func ParseEvent ¶
func ParseEvent(sev sdk.StringEvent) (Event, error)
ParseEvent parses string to event