transfer

package
v0.0.0-...-2c69f69 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyTo         = errors.New("empty to")
	ErrEmptyAmount     = errors.New("empty amount")
	ErrUncorrectAmount = errors.New("incorrect amount")
)

Functions

func ValidateReq

func ValidateReq(r Request) error

Types

type Request

type Request struct {
	To     string `json:"to"`
	Amount string `json:"amount"`
}

type Response

type Response struct {
	Error string `json:"error,omitempty"`
	OK    bool   `json:"ok"`
}

func Error

func Error(msg string) Response

func OK

func OK() Response

Jump to

Keyboard shortcuts

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