currency

package
v0.0.0-...-8150c3c Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Currencies_name = map[int32]string{
		0:  "EUR",
		1:  "CAD",
		2:  "HKD",
		3:  "ISK",
		4:  "PHP",
		5:  "DKK",
		6:  "HUF",
		7:  "CZK",
		8:  "AUD",
		9:  "RON",
		10: "SEK",
		11: "IDR",
		12: "INR",
		13: "BRL",
		14: "RUB",
		15: "HRK",
		16: "JPY",
		17: "THB",
		18: "CHF",
		19: "SGD",
		20: "PLN",
		21: "BGN",
		22: "TRY",
		23: "CNY",
		24: "NOK",
		25: "NZD",
		26: "ZAR",
		27: "USD",
		28: "MXN",
		29: "ILS",
		30: "GBP",
		31: "KRW",
		32: "MYR",
	}
	Currencies_value = map[string]int32{
		"EUR": 0,
		"CAD": 1,
		"HKD": 2,
		"ISK": 3,
		"PHP": 4,
		"DKK": 5,
		"HUF": 6,
		"CZK": 7,
		"AUD": 8,
		"RON": 9,
		"SEK": 10,
		"IDR": 11,
		"INR": 12,
		"BRL": 13,
		"RUB": 14,
		"HRK": 15,
		"JPY": 16,
		"THB": 17,
		"CHF": 18,
		"SGD": 19,
		"PLN": 20,
		"BGN": 21,
		"TRY": 22,
		"CNY": 23,
		"NOK": 24,
		"NZD": 25,
		"ZAR": 26,
		"USD": 27,
		"MXN": 28,
		"ILS": 29,
		"GBP": 30,
		"KRW": 31,
		"MYR": 32,
	}
)

Enum value maps for Currencies.

View Source
var File_currency_proto protoreflect.FileDescriptor

Functions

func RegisterCurrencyServer

func RegisterCurrencyServer(s *grpc.Server, srv CurrencyServer)

Types

type Currencies

type Currencies int32
const (
	Currencies_EUR Currencies = 0
	Currencies_CAD Currencies = 1
	Currencies_HKD Currencies = 2
	Currencies_ISK Currencies = 3
	Currencies_PHP Currencies = 4
	Currencies_DKK Currencies = 5
	Currencies_HUF Currencies = 6
	Currencies_CZK Currencies = 7
	Currencies_AUD Currencies = 8
	Currencies_RON Currencies = 9
	Currencies_SEK Currencies = 10
	Currencies_IDR Currencies = 11
	Currencies_INR Currencies = 12
	Currencies_BRL Currencies = 13
	Currencies_RUB Currencies = 14
	Currencies_HRK Currencies = 15
	Currencies_JPY Currencies = 16
	Currencies_THB Currencies = 17
	Currencies_CHF Currencies = 18
	Currencies_SGD Currencies = 19
	Currencies_PLN Currencies = 20
	Currencies_BGN Currencies = 21
	Currencies_TRY Currencies = 22
	Currencies_CNY Currencies = 23
	Currencies_NOK Currencies = 24
	Currencies_NZD Currencies = 25
	Currencies_ZAR Currencies = 26
	Currencies_USD Currencies = 27
	Currencies_MXN Currencies = 28
	Currencies_ILS Currencies = 29
	Currencies_GBP Currencies = 30
	Currencies_KRW Currencies = 31
	Currencies_MYR Currencies = 32
)

func (Currencies) Descriptor

func (Currencies) Descriptor() protoreflect.EnumDescriptor

func (Currencies) Enum

func (x Currencies) Enum() *Currencies

func (Currencies) EnumDescriptor deprecated

func (Currencies) EnumDescriptor() ([]byte, []int)

Deprecated: Use Currencies.Descriptor instead.

func (Currencies) Number

func (x Currencies) Number() protoreflect.EnumNumber

func (Currencies) String

func (x Currencies) String() string

func (Currencies) Type

type CurrenciesRequest

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

func (*CurrenciesRequest) Descriptor deprecated

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

Deprecated: Use CurrenciesRequest.ProtoReflect.Descriptor instead.

func (*CurrenciesRequest) ProtoMessage

func (*CurrenciesRequest) ProtoMessage()

func (*CurrenciesRequest) ProtoReflect

func (x *CurrenciesRequest) ProtoReflect() protoreflect.Message

func (*CurrenciesRequest) Reset

func (x *CurrenciesRequest) Reset()

func (*CurrenciesRequest) String

func (x *CurrenciesRequest) String() string

type CurrenciesResponse

type CurrenciesResponse struct {
	Currencies []string `protobuf:"bytes,1,rep,name=currencies,proto3" json:"currencies,omitempty"`
	// contains filtered or unexported fields
}

func (*CurrenciesResponse) Descriptor deprecated

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

Deprecated: Use CurrenciesResponse.ProtoReflect.Descriptor instead.

func (*CurrenciesResponse) GetCurrencies

func (x *CurrenciesResponse) GetCurrencies() []string

func (*CurrenciesResponse) ProtoMessage

func (*CurrenciesResponse) ProtoMessage()

func (*CurrenciesResponse) ProtoReflect

func (x *CurrenciesResponse) ProtoReflect() protoreflect.Message

func (*CurrenciesResponse) Reset

func (x *CurrenciesResponse) Reset()

func (*CurrenciesResponse) String

func (x *CurrenciesResponse) String() string

type CurrencyClient

type CurrencyClient interface {
	GetRate(ctx context.Context, in *RateRequest, opts ...grpc.CallOption) (*RateResponse, error)
	GetCurrencyCodes(ctx context.Context, in *CurrenciesRequest, opts ...grpc.CallOption) (*CurrenciesResponse, error)
	Subscribe(ctx context.Context, opts ...grpc.CallOption) (Currency_SubscribeClient, error)
}

CurrencyClient is the client API for Currency service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewCurrencyClient

func NewCurrencyClient(cc grpc.ClientConnInterface) CurrencyClient

type CurrencyServer

type CurrencyServer interface {
	GetRate(context.Context, *RateRequest) (*RateResponse, error)
	GetCurrencyCodes(context.Context, *CurrenciesRequest) (*CurrenciesResponse, error)
	Subscribe(Currency_SubscribeServer) error
}

CurrencyServer is the server API for Currency service.

type Currency_SubscribeClient

type Currency_SubscribeClient interface {
	Send(*RateRequest) error
	Recv() (*RateResponse, error)
	grpc.ClientStream
}

type Currency_SubscribeServer

type Currency_SubscribeServer interface {
	Send(*RateResponse) error
	Recv() (*RateRequest, error)
	grpc.ServerStream
}

type RateRequest

type RateRequest struct {
	Base        Currencies `protobuf:"varint,1,opt,name=Base,proto3,enum=Currencies" json:"Base,omitempty"`
	Destination Currencies `protobuf:"varint,2,opt,name=Destination,proto3,enum=Currencies" json:"Destination,omitempty"`
	// contains filtered or unexported fields
}

func (*RateRequest) Descriptor deprecated

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

Deprecated: Use RateRequest.ProtoReflect.Descriptor instead.

func (*RateRequest) GetBase

func (x *RateRequest) GetBase() Currencies

func (*RateRequest) GetDestination

func (x *RateRequest) GetDestination() Currencies

func (*RateRequest) ProtoMessage

func (*RateRequest) ProtoMessage()

func (*RateRequest) ProtoReflect

func (x *RateRequest) ProtoReflect() protoreflect.Message

func (*RateRequest) Reset

func (x *RateRequest) Reset()

func (*RateRequest) String

func (x *RateRequest) String() string

type RateResponse

type RateResponse struct {
	Base        Currencies `protobuf:"varint,1,opt,name=Base,proto3,enum=Currencies" json:"Base,omitempty"`
	Destination Currencies `protobuf:"varint,2,opt,name=Destination,proto3,enum=Currencies" json:"Destination,omitempty"`
	Rate        float64    `protobuf:"fixed64,3,opt,name=Rate,proto3" json:"Rate,omitempty"`
	// contains filtered or unexported fields
}

func (*RateResponse) Descriptor deprecated

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

Deprecated: Use RateResponse.ProtoReflect.Descriptor instead.

func (*RateResponse) GetBase

func (x *RateResponse) GetBase() Currencies

func (*RateResponse) GetDestination

func (x *RateResponse) GetDestination() Currencies

func (*RateResponse) GetRate

func (x *RateResponse) GetRate() float64

func (*RateResponse) ProtoMessage

func (*RateResponse) ProtoMessage()

func (*RateResponse) ProtoReflect

func (x *RateResponse) ProtoReflect() protoreflect.Message

func (*RateResponse) Reset

func (x *RateResponse) Reset()

func (*RateResponse) String

func (x *RateResponse) String() string

type UnimplementedCurrencyServer

type UnimplementedCurrencyServer struct {
}

UnimplementedCurrencyServer can be embedded to have forward compatible implementations.

func (*UnimplementedCurrencyServer) GetCurrencyCodes

func (*UnimplementedCurrencyServer) GetRate

func (*UnimplementedCurrencyServer) Subscribe

Jump to

Keyboard shortcuts

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