currency

package
v0.0.0-...-38fc69b Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2017 License: Apache-2.0 Imports: 6 Imported by: 7

Documentation

Overview

Package currency is a generated protocol buffer package.

It is generated from these files:

github.com/crypto-bank/proto/currency/currency.proto

It has these top-level messages:

Currency
Pair
Volume

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthCurrency = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCurrency   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type Currency

type Currency struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
}

Currency - Currency symbol.

func FromString

func FromString(symbol string) *Currency

FromString - Creates a currency from a symbol string.

func (*Currency) Descriptor

func (*Currency) Descriptor() ([]byte, []int)

func (*Currency) Equal

func (this *Currency) Equal(that interface{}) bool

func (*Currency) GetSymbol

func (m *Currency) GetSymbol() string

func (*Currency) Marshal

func (m *Currency) Marshal() (dAtA []byte, err error)

func (*Currency) MarshalTo

func (m *Currency) MarshalTo(dAtA []byte) (int, error)

func (*Currency) ProtoMessage

func (*Currency) ProtoMessage()

func (*Currency) Reset

func (m *Currency) Reset()

func (*Currency) Size

func (m *Currency) Size() (n int)

func (*Currency) String

func (m *Currency) String() string

func (*Currency) Unmarshal

func (m *Currency) Unmarshal(dAtA []byte) error

type Pair

type Pair struct {
	// First - First currency in pair.
	First *Currency `protobuf:"bytes,1,opt,name=first" json:"first,omitempty"`
	// Second - Second currency in pair.
	Second *Currency `protobuf:"bytes,2,opt,name=second" json:"second,omitempty"`
}

Pair - Currency pair.

func NewPair

func NewPair(first, second string) *Pair

NewPair - Creates a new currency pair from symbols.

func ParsePair

func ParsePair(pair, symbol string) (_ *Pair, err error)

ParsePair - Parses a currency pair separated by a symbol.

func (*Pair) Concat

func (pair *Pair) Concat(symbol string) string

Concat - Concats currency pair with a symbol.

func (*Pair) Descriptor

func (*Pair) Descriptor() ([]byte, []int)

func (*Pair) Equal

func (this *Pair) Equal(that interface{}) bool

func (*Pair) GetFirst

func (m *Pair) GetFirst() *Currency

func (*Pair) GetSecond

func (m *Pair) GetSecond() *Currency

func (*Pair) Marshal

func (m *Pair) Marshal() (dAtA []byte, err error)

func (*Pair) MarshalTo

func (m *Pair) MarshalTo(dAtA []byte) (int, error)

func (*Pair) ProtoMessage

func (*Pair) ProtoMessage()

func (*Pair) Reset

func (m *Pair) Reset()

func (*Pair) Size

func (m *Pair) Size() (n int)

func (*Pair) String

func (m *Pair) String() string

func (*Pair) Unmarshal

func (m *Pair) Unmarshal(dAtA []byte) error

type Volume

type Volume struct {
	// Currency - Currency symbol.
	Currency *Currency `protobuf:"bytes,1,opt,name=currency" json:"currency,omitempty"`
	// Amount - Amount of currency.
	Amount float64 `protobuf:"fixed64,2,opt,name=amount,proto3" json:"amount,omitempty"`
}

Volume - Currency volume.

func NewVolume

func NewVolume(currency *Currency, amount float64) *Volume

NewVolume - Creates currency volume structure.

func (*Volume) Descriptor

func (*Volume) Descriptor() ([]byte, []int)

func (*Volume) Equal

func (this *Volume) Equal(that interface{}) bool

func (*Volume) GetAmount

func (m *Volume) GetAmount() float64

func (*Volume) GetCurrency

func (m *Volume) GetCurrency() *Currency

func (*Volume) HumanString

func (volume *Volume) HumanString() string

HumanString - Volume as human-readable string.

func (*Volume) Marshal

func (m *Volume) Marshal() (dAtA []byte, err error)

func (*Volume) MarshalTo

func (m *Volume) MarshalTo(dAtA []byte) (int, error)

func (*Volume) ProtoMessage

func (*Volume) ProtoMessage()

func (*Volume) Reset

func (m *Volume) Reset()

func (*Volume) Size

func (m *Volume) Size() (n int)

func (*Volume) String

func (m *Volume) String() string

func (*Volume) Unmarshal

func (m *Volume) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

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