iex

package
v0.0.0-...-d047bce Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package iex is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_services_iex_pb_v1_iex_proto protoreflect.FileDescriptor

Functions

func RegisterIEXServiceHandler

func RegisterIEXServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterIEXServiceHandler registers the http handlers for service IEXService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterIEXServiceHandlerClient

func RegisterIEXServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client IEXServiceClient) error

RegisterIEXServiceHandlerClient registers the http handlers for service IEXService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "IEXServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "IEXServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "IEXServiceClient" to call the correct interceptors.

func RegisterIEXServiceHandlerFromEndpoint

func RegisterIEXServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterIEXServiceHandlerFromEndpoint is same as RegisterIEXServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterIEXServiceHandlerServer

func RegisterIEXServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server IEXServiceServer) error

RegisterIEXServiceHandlerServer registers the http handlers for service IEXService to "mux". UnaryRPC :call IEXServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterIEXServiceHandlerFromEndpoint instead.

func RegisterIEXServiceServer

func RegisterIEXServiceServer(s grpc.ServiceRegistrar, srv IEXServiceServer)

Types

type GetCompanyRequest

type GetCompanyRequest struct {
	Isin string `protobuf:"bytes,1,opt,name=isin,proto3" json:"isin,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCompanyRequest) Descriptor deprecated

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

Deprecated: Use GetCompanyRequest.ProtoReflect.Descriptor instead.

func (*GetCompanyRequest) GetIsin

func (x *GetCompanyRequest) GetIsin() string

func (*GetCompanyRequest) ProtoMessage

func (*GetCompanyRequest) ProtoMessage()

func (*GetCompanyRequest) ProtoReflect

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

func (*GetCompanyRequest) Reset

func (x *GetCompanyRequest) Reset()

func (*GetCompanyRequest) String

func (x *GetCompanyRequest) String() string

type GetCompanyResponse

type GetCompanyResponse struct {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Industry string `protobuf:"bytes,2,opt,name=industry,proto3" json:"industry,omitempty"`
	Sector   string `protobuf:"bytes,3,opt,name=sector,proto3" json:"sector,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCompanyResponse) Descriptor deprecated

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

Deprecated: Use GetCompanyResponse.ProtoReflect.Descriptor instead.

func (*GetCompanyResponse) GetIndustry

func (x *GetCompanyResponse) GetIndustry() string

func (*GetCompanyResponse) GetName

func (x *GetCompanyResponse) GetName() string

func (*GetCompanyResponse) GetSector

func (x *GetCompanyResponse) GetSector() string

func (*GetCompanyResponse) ProtoMessage

func (*GetCompanyResponse) ProtoMessage()

func (*GetCompanyResponse) ProtoReflect

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

func (*GetCompanyResponse) Reset

func (x *GetCompanyResponse) Reset()

func (*GetCompanyResponse) String

func (x *GetCompanyResponse) String() string

type GetPricesRequest

type GetPricesRequest struct {
	Isin       string  `protobuf:"bytes,1,opt,name=isin,proto3" json:"isin,omitempty"`
	Timestamps []int64 `protobuf:"varint,2,rep,packed,name=timestamps,proto3" json:"timestamps,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPricesRequest) Descriptor deprecated

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

Deprecated: Use GetPricesRequest.ProtoReflect.Descriptor instead.

func (*GetPricesRequest) GetIsin

func (x *GetPricesRequest) GetIsin() string

func (*GetPricesRequest) GetTimestamps

func (x *GetPricesRequest) GetTimestamps() []int64

func (*GetPricesRequest) ProtoMessage

func (*GetPricesRequest) ProtoMessage()

func (*GetPricesRequest) ProtoReflect

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

func (*GetPricesRequest) Reset

func (x *GetPricesRequest) Reset()

func (*GetPricesRequest) String

func (x *GetPricesRequest) String() string

type GetPricesResponse

type GetPricesResponse struct {
	Prices []*GetPricesResponse_Timepoint `protobuf:"bytes,1,rep,name=prices,proto3" json:"prices,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPricesResponse) Descriptor deprecated

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

Deprecated: Use GetPricesResponse.ProtoReflect.Descriptor instead.

func (*GetPricesResponse) GetPrices

func (*GetPricesResponse) ProtoMessage

func (*GetPricesResponse) ProtoMessage()

func (*GetPricesResponse) ProtoReflect

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

func (*GetPricesResponse) Reset

func (x *GetPricesResponse) Reset()

func (*GetPricesResponse) String

func (x *GetPricesResponse) String() string

type GetPricesResponse_Timepoint

type GetPricesResponse_Timepoint struct {

	// unix timestamp
	Time int64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"`
	// Price in USD
	Price float64 `protobuf:"fixed64,2,opt,name=price,proto3" json:"price,omitempty"`
	// contains filtered or unexported fields
}

price at a specifig time.

func (*GetPricesResponse_Timepoint) Descriptor deprecated

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

Deprecated: Use GetPricesResponse_Timepoint.ProtoReflect.Descriptor instead.

func (*GetPricesResponse_Timepoint) GetPrice

func (x *GetPricesResponse_Timepoint) GetPrice() float64

func (*GetPricesResponse_Timepoint) GetTime

func (x *GetPricesResponse_Timepoint) GetTime() int64

func (*GetPricesResponse_Timepoint) ProtoMessage

func (*GetPricesResponse_Timepoint) ProtoMessage()

func (*GetPricesResponse_Timepoint) ProtoReflect

func (*GetPricesResponse_Timepoint) Reset

func (x *GetPricesResponse_Timepoint) Reset()

func (*GetPricesResponse_Timepoint) String

func (x *GetPricesResponse_Timepoint) String() string

type IEXServiceClient

type IEXServiceClient interface {
	// GetPrices returns the daily closing price for a company.
	GetPrices(ctx context.Context, in *GetPricesRequest, opts ...grpc.CallOption) (*GetPricesResponse, error)
	GetCompany(ctx context.Context, in *GetCompanyRequest, opts ...grpc.CallOption) (*GetCompanyResponse, error)
}

IEXServiceClient is the client API for IEXService 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 NewIEXServiceClient

func NewIEXServiceClient(cc grpc.ClientConnInterface) IEXServiceClient

type IEXServiceServer

type IEXServiceServer interface {
	// GetPrices returns the daily closing price for a company.
	GetPrices(context.Context, *GetPricesRequest) (*GetPricesResponse, error)
	GetCompany(context.Context, *GetCompanyRequest) (*GetCompanyResponse, error)
	// contains filtered or unexported methods
}

IEXServiceServer is the server API for IEXService service. All implementations must embed UnimplementedIEXServiceServer for forward compatibility

type UnimplementedIEXServiceServer

type UnimplementedIEXServiceServer struct {
}

UnimplementedIEXServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedIEXServiceServer) GetCompany

func (UnimplementedIEXServiceServer) GetPrices

type UnsafeIEXServiceServer

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

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

Jump to

Keyboard shortcuts

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