currency

package
v0.0.0-...-9520465 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Currencies_name = map[int32]string{
	0: "KES",
	1: "USD",
	2: "UGSH",
	3: "TZSH",
}
View Source
var Currencies_value = map[string]int32{
	"KES":  0,
	"USD":  1,
	"UGSH": 2,
	"TZSH": 3,
}

Functions

func RegisterCurrencyServer

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

Types

type Currencies

type Currencies int32
const (
	Currencies_KES  Currencies = 0
	Currencies_USD  Currencies = 1
	Currencies_UGSH Currencies = 2
	Currencies_TZSH Currencies = 3
)

func (Currencies) EnumDescriptor

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

func (Currencies) String

func (x Currencies) String() string

type CurrencyClient

type CurrencyClient interface {
	GetRate(ctx context.Context, in *RateRequest, opts ...grpc.CallOption) (*RateResponse, 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)
}

CurrencyServer is the server API for Currency service.

type RateRequest

type RateRequest struct {
	To                   Currencies `protobuf:"varint,1,opt,name=To,proto3,enum=Currencies" json:"To,omitempty"`
	From                 Currencies `protobuf:"varint,2,opt,name=From,proto3,enum=Currencies" json:"From,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*RateRequest) Descriptor

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

func (*RateRequest) GetFrom

func (m *RateRequest) GetFrom() Currencies

func (*RateRequest) GetTo

func (m *RateRequest) GetTo() Currencies

func (*RateRequest) ProtoMessage

func (*RateRequest) ProtoMessage()

func (*RateRequest) Reset

func (m *RateRequest) Reset()

func (*RateRequest) String

func (m *RateRequest) String() string

func (*RateRequest) XXX_DiscardUnknown

func (m *RateRequest) XXX_DiscardUnknown()

func (*RateRequest) XXX_Marshal

func (m *RateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RateRequest) XXX_Merge

func (m *RateRequest) XXX_Merge(src proto.Message)

func (*RateRequest) XXX_Size

func (m *RateRequest) XXX_Size() int

func (*RateRequest) XXX_Unmarshal

func (m *RateRequest) XXX_Unmarshal(b []byte) error

type RateResponse

type RateResponse struct {
	Unit                 float32  `protobuf:"fixed32,1,opt,name=Unit,proto3" json:"Unit,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RateResponse) Descriptor

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

func (*RateResponse) GetUnit

func (m *RateResponse) GetUnit() float32

func (*RateResponse) ProtoMessage

func (*RateResponse) ProtoMessage()

func (*RateResponse) Reset

func (m *RateResponse) Reset()

func (*RateResponse) String

func (m *RateResponse) String() string

func (*RateResponse) XXX_DiscardUnknown

func (m *RateResponse) XXX_DiscardUnknown()

func (*RateResponse) XXX_Marshal

func (m *RateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RateResponse) XXX_Merge

func (m *RateResponse) XXX_Merge(src proto.Message)

func (*RateResponse) XXX_Size

func (m *RateResponse) XXX_Size() int

func (*RateResponse) XXX_Unmarshal

func (m *RateResponse) XXX_Unmarshal(b []byte) error

type UnimplementedCurrencyServer

type UnimplementedCurrencyServer struct {
}

UnimplementedCurrencyServer can be embedded to have forward compatible implementations.

func (*UnimplementedCurrencyServer) GetRate

Jump to

Keyboard shortcuts

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