common

package
v0.0.0-...-838934d Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CurrencyVersion    = 0
	CurrencyCapability = "currency"
	CurrencyTicker     = "ticker"
)

Variables

View Source
var (
	ErrInvalidCurrencyRequest = errors.New("kaetzchen/meson: invalid request")
)

Functions

func RespondFailure

func RespondFailure(err error) []byte

func RespondSuccess

func RespondSuccess(message string) []byte

func ResponseFromJson

func ResponseFromJson(rawResponse []byte) (string, error)

Types

type CurrencyRequest

type CurrencyRequest struct {
	Version int
	Tx      string
	Ticker  string
}

func NewRequest

func NewRequest(ticker string, hexBlob string) *CurrencyRequest

func RequestFromJson

func RequestFromJson(expectedTicker string, rawRequest []byte) (*CurrencyRequest, error)

func (*CurrencyRequest) ToJson

func (c *CurrencyRequest) ToJson() []byte

type CurrencyResponse

type CurrencyResponse struct {
	Version int
	Message string
	Error   string
}

func NewResponse

func NewResponse(message string, errMsg string) *CurrencyResponse

func (*CurrencyResponse) ToJson

func (c *CurrencyResponse) ToJson() []byte

Directories

Path Synopsis
Package main for client C binding.
Package main for client C binding.

Jump to

Keyboard shortcuts

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