protos

package
v0.0.0-...-070c868 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: GPL-3.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Currencies_name = map[int32]string{
	0:  "USD",
	1:  "EUR",
	2:  "JPY",
	3:  "BGN",
	4:  "CZK",
	5:  "DKK",
	6:  "GBP",
	7:  "HUF",
	8:  "PLN",
	9:  "RON",
	10: "SEK",
	11: "CHF",
	12: "ISK",
	13: "NOK",
	14: "HRK",
	15: "RUB",
	16: "TRY",
	17: "AUD",
	18: "BRL",
	19: "CAD",
	20: "CNY",
	21: "HKD",
	22: "IDR",
	23: "ILS",
	24: "INR",
	25: "KRW",
	26: "MXN",
	27: "MYR",
	28: "NZD",
	29: "PHP",
	30: "SGD",
	31: "THB",
	32: "ZAR",
}
View Source
var Currencies_value = map[string]int32{
	"USD": 0,
	"EUR": 1,
	"JPY": 2,
	"BGN": 3,
	"CZK": 4,
	"DKK": 5,
	"GBP": 6,
	"HUF": 7,
	"PLN": 8,
	"RON": 9,
	"SEK": 10,
	"CHF": 11,
	"ISK": 12,
	"NOK": 13,
	"HRK": 14,
	"RUB": 15,
	"TRY": 16,
	"AUD": 17,
	"BRL": 18,
	"CAD": 19,
	"CNY": 20,
	"HKD": 21,
	"IDR": 22,
	"ILS": 23,
	"INR": 24,
	"KRW": 25,
	"MXN": 26,
	"MYR": 27,
	"NZD": 28,
	"PHP": 29,
	"SGD": 30,
	"THB": 31,
	"ZAR": 32,
}
View Source
var Watcher_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Watcher",
	HandlerType: (*WatcherServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetInfo",
			Handler:    _Watcher_GetInfo_Handler,
		},
		{
			MethodName: "MoreInfo",
			Handler:    _Watcher_MoreInfo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protos/watcher.proto",
}

Watcher_ServiceDesc is the grpc.ServiceDesc for Watcher service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterWatcherServer

func RegisterWatcherServer(s grpc.ServiceRegistrar, srv WatcherServer)

Types

type CompanyResponse

type CompanyResponse struct {
	Ticker               string   `protobuf:"bytes,1,opt,name=Ticker,proto3" json:"Ticker,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	Exchange             string   `protobuf:"bytes,3,opt,name=Exchange,proto3" json:"Exchange,omitempty"`
	Sector               string   `protobuf:"bytes,4,opt,name=Sector,proto3" json:"Sector,omitempty"`
	MarketCap            string   `protobuf:"bytes,5,opt,name=MarketCap,proto3" json:"MarketCap,omitempty"`
	PERatio              string   `protobuf:"bytes,6,opt,name=PERatio,proto3" json:"PERatio,omitempty"`
	PEGRatio             string   `protobuf:"bytes,7,opt,name=PEGRatio,proto3" json:"PEGRatio,omitempty"`
	DivPerShare          string   `protobuf:"bytes,8,opt,name=DivPerShare,proto3" json:"DivPerShare,omitempty"`
	EPS                  string   `protobuf:"bytes,9,opt,name=EPS,proto3" json:"EPS,omitempty"`
	RevPerShare          string   `protobuf:"bytes,10,opt,name=RevPerShare,proto3" json:"RevPerShare,omitempty"`
	ProfitMargin         string   `protobuf:"bytes,11,opt,name=ProfitMargin,proto3" json:"ProfitMargin,omitempty"`
	YearHigh             string   `protobuf:"bytes,12,opt,name=YearHigh,proto3" json:"YearHigh,omitempty"`
	YearLow              string   `protobuf:"bytes,13,opt,name=YearLow,proto3" json:"YearLow,omitempty"`
	SharesOutstanding    string   `protobuf:"bytes,14,opt,name=SharesOutstanding,proto3" json:"SharesOutstanding,omitempty"`
	PriceToBookRatio     string   `protobuf:"bytes,15,opt,name=PriceToBookRatio,proto3" json:"PriceToBookRatio,omitempty"`
	Beta                 string   `protobuf:"bytes,16,opt,name=Beta,proto3" json:"Beta,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CompanyResponse) Descriptor

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

func (*CompanyResponse) GetBeta

func (m *CompanyResponse) GetBeta() string

func (*CompanyResponse) GetDivPerShare

func (m *CompanyResponse) GetDivPerShare() string

func (*CompanyResponse) GetEPS

func (m *CompanyResponse) GetEPS() string

func (*CompanyResponse) GetExchange

func (m *CompanyResponse) GetExchange() string

func (*CompanyResponse) GetMarketCap

func (m *CompanyResponse) GetMarketCap() string

func (*CompanyResponse) GetName

func (m *CompanyResponse) GetName() string

func (*CompanyResponse) GetPEGRatio

func (m *CompanyResponse) GetPEGRatio() string

func (*CompanyResponse) GetPERatio

func (m *CompanyResponse) GetPERatio() string

func (*CompanyResponse) GetPriceToBookRatio

func (m *CompanyResponse) GetPriceToBookRatio() string

func (*CompanyResponse) GetProfitMargin

func (m *CompanyResponse) GetProfitMargin() string

func (*CompanyResponse) GetRevPerShare

func (m *CompanyResponse) GetRevPerShare() string

func (*CompanyResponse) GetSector

func (m *CompanyResponse) GetSector() string

func (*CompanyResponse) GetSharesOutstanding

func (m *CompanyResponse) GetSharesOutstanding() string

func (*CompanyResponse) GetTicker

func (m *CompanyResponse) GetTicker() string

func (*CompanyResponse) GetYearHigh

func (m *CompanyResponse) GetYearHigh() string

func (*CompanyResponse) GetYearLow

func (m *CompanyResponse) GetYearLow() string

func (*CompanyResponse) ProtoMessage

func (*CompanyResponse) ProtoMessage()

func (*CompanyResponse) Reset

func (m *CompanyResponse) Reset()

func (*CompanyResponse) String

func (m *CompanyResponse) String() string

func (*CompanyResponse) XXX_DiscardUnknown

func (m *CompanyResponse) XXX_DiscardUnknown()

func (*CompanyResponse) XXX_Marshal

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

func (*CompanyResponse) XXX_Merge

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

func (*CompanyResponse) XXX_Size

func (m *CompanyResponse) XXX_Size() int

func (*CompanyResponse) XXX_Unmarshal

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

type Currencies

type Currencies int32

Currencies is the enum which represents the allowed currencies for the API USD is the default currency

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

func (Currencies) EnumDescriptor

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

func (Currencies) String

func (x Currencies) String() string

type TickerRequest

type TickerRequest struct {
	Ticker               string     `protobuf:"bytes,1,opt,name=Ticker,proto3" json:"Ticker,omitempty"`
	Destination          Currencies `protobuf:"varint,2,opt,name=Destination,proto3,enum=Currencies" json:"Destination,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*TickerRequest) Descriptor

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

func (*TickerRequest) GetDestination

func (m *TickerRequest) GetDestination() Currencies

func (*TickerRequest) GetTicker

func (m *TickerRequest) GetTicker() string

func (*TickerRequest) ProtoMessage

func (*TickerRequest) ProtoMessage()

func (*TickerRequest) Reset

func (m *TickerRequest) Reset()

func (*TickerRequest) String

func (m *TickerRequest) String() string

func (*TickerRequest) XXX_DiscardUnknown

func (m *TickerRequest) XXX_DiscardUnknown()

func (*TickerRequest) XXX_Marshal

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

func (*TickerRequest) XXX_Merge

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

func (*TickerRequest) XXX_Size

func (m *TickerRequest) XXX_Size() int

func (*TickerRequest) XXX_Unmarshal

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

type TickerResponse

type TickerResponse struct {
	Symbol               string   `protobuf:"bytes,1,opt,name=Symbol,proto3" json:"Symbol,omitempty"`
	Open                 string   `protobuf:"bytes,2,opt,name=Open,proto3" json:"Open,omitempty"`
	High                 string   `protobuf:"bytes,3,opt,name=High,proto3" json:"High,omitempty"`
	Low                  string   `protobuf:"bytes,4,opt,name=Low,proto3" json:"Low,omitempty"`
	Price                string   `protobuf:"bytes,5,opt,name=Price,proto3" json:"Price,omitempty"`
	Volume               string   `protobuf:"bytes,6,opt,name=Volume,proto3" json:"Volume,omitempty"`
	LTD                  string   `protobuf:"bytes,7,opt,name=LTD,proto3" json:"LTD,omitempty"`
	PrevClose            string   `protobuf:"bytes,8,opt,name=PrevClose,proto3" json:"PrevClose,omitempty"`
	Change               string   `protobuf:"bytes,9,opt,name=Change,proto3" json:"Change,omitempty"`
	PercentChange        string   `protobuf:"bytes,10,opt,name=PercentChange,proto3" json:"PercentChange,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TickerResponse) Descriptor

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

func (*TickerResponse) GetChange

func (m *TickerResponse) GetChange() string

func (*TickerResponse) GetHigh

func (m *TickerResponse) GetHigh() string

func (*TickerResponse) GetLTD

func (m *TickerResponse) GetLTD() string

func (*TickerResponse) GetLow

func (m *TickerResponse) GetLow() string

func (*TickerResponse) GetOpen

func (m *TickerResponse) GetOpen() string

func (*TickerResponse) GetPercentChange

func (m *TickerResponse) GetPercentChange() string

func (*TickerResponse) GetPrevClose

func (m *TickerResponse) GetPrevClose() string

func (*TickerResponse) GetPrice

func (m *TickerResponse) GetPrice() string

func (*TickerResponse) GetSymbol

func (m *TickerResponse) GetSymbol() string

func (*TickerResponse) GetVolume

func (m *TickerResponse) GetVolume() string

func (*TickerResponse) ProtoMessage

func (*TickerResponse) ProtoMessage()

func (*TickerResponse) Reset

func (m *TickerResponse) Reset()

func (*TickerResponse) String

func (m *TickerResponse) String() string

func (*TickerResponse) XXX_DiscardUnknown

func (m *TickerResponse) XXX_DiscardUnknown()

func (*TickerResponse) XXX_Marshal

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

func (*TickerResponse) XXX_Merge

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

func (*TickerResponse) XXX_Size

func (m *TickerResponse) XXX_Size() int

func (*TickerResponse) XXX_Unmarshal

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

type UnimplementedWatcherServer

type UnimplementedWatcherServer struct {
}

UnimplementedWatcherServer must be embedded to have forward compatible implementations.

func (UnimplementedWatcherServer) GetInfo

func (UnimplementedWatcherServer) MoreInfo

type UnsafeWatcherServer

type UnsafeWatcherServer interface {
	// contains filtered or unexported methods
}

UnsafeWatcherServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WatcherServer will result in compilation errors.

type WatcherClient

type WatcherClient interface {
	GetInfo(ctx context.Context, in *TickerRequest, opts ...grpc.CallOption) (*TickerResponse, error)
	MoreInfo(ctx context.Context, in *TickerRequest, opts ...grpc.CallOption) (*CompanyResponse, error)
}

WatcherClient is the client API for Watcher service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewWatcherClient

func NewWatcherClient(cc grpc.ClientConnInterface) WatcherClient

type WatcherServer

type WatcherServer interface {
	GetInfo(context.Context, *TickerRequest) (*TickerResponse, error)
	MoreInfo(context.Context, *TickerRequest) (*CompanyResponse, error)
	// contains filtered or unexported methods
}

WatcherServer is the server API for Watcher service. All implementations must embed UnimplementedWatcherServer for forward compatibility

Jump to

Keyboard shortcuts

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