Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterAssetsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAssetsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AssetsServiceClient) error
- func RegisterAssetsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAssetsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AssetsServiceServer) error
- func RegisterAssetsServiceServer(s grpc.ServiceRegistrar, srv AssetsServiceServer)
- type AssetsServiceClient
- type AssetsServiceServer
- type AssetsService_QueryAssetsClient
- type AssetsService_QueryAssetsServer
- type GetAssetRequest
- func (*GetAssetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAssetRequest) GetProviderId() gopb.Provider
- func (x *GetAssetRequest) GetSymbol() string
- func (*GetAssetRequest) ProtoMessage()
- func (x *GetAssetRequest) ProtoReflect() protoreflect.Message
- func (x *GetAssetRequest) Reset()
- func (x *GetAssetRequest) String() string
- type QueryAssetsRequest
- func (*QueryAssetsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryAssetsRequest) GetAllowInactive() bool
- func (x *QueryAssetsRequest) GetCik() string
- func (x *QueryAssetsRequest) GetDate() *gopb.UnixTimestamp
- func (x *QueryAssetsRequest) GetExchange() string
- func (x *QueryAssetsRequest) GetLocale() gopb.Financial_Common_Locale
- func (x *QueryAssetsRequest) GetMarket() gopb.Financial_Common_AssetClass
- func (x *QueryAssetsRequest) GetProviderId() gopb.Provider
- func (x *QueryAssetsRequest) GetSearch() string
- func (x *QueryAssetsRequest) GetType() gopb.Financial_Common_AssetType
- func (*QueryAssetsRequest) ProtoMessage()
- func (x *QueryAssetsRequest) ProtoReflect() protoreflect.Message
- func (x *QueryAssetsRequest) Reset()
- func (x *QueryAssetsRequest) String() string
- type UnimplementedAssetsServiceServer
- type UnsafeAssetsServiceServer
Constants ¶
const ( AssetsService_QueryAssets_FullMethodName = "/protos.frontend.assets.v1.AssetsService/QueryAssets" AssetsService_GetAsset_FullMethodName = "/protos.frontend.assets.v1.AssetsService/GetAsset" )
Variables ¶
var AssetsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protos.frontend.assets.v1.AssetsService", HandlerType: (*AssetsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAsset", Handler: _AssetsService_GetAsset_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "QueryAssets", Handler: _AssetsService_QueryAssets_Handler, ServerStreams: true, }, }, Metadata: "protos/frontend/assets/v1/service.proto", }
AssetsService_ServiceDesc is the grpc.ServiceDesc for AssetsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_protos_frontend_assets_v1_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAssetsServiceHandler ¶
func RegisterAssetsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAssetsServiceHandler registers the http handlers for service AssetsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAssetsServiceHandlerClient ¶
func RegisterAssetsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AssetsServiceClient) error
RegisterAssetsServiceHandlerClient registers the http handlers for service AssetsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AssetsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AssetsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AssetsServiceClient" to call the correct interceptors.
func RegisterAssetsServiceHandlerFromEndpoint ¶
func RegisterAssetsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAssetsServiceHandlerFromEndpoint is same as RegisterAssetsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAssetsServiceHandlerServer ¶
func RegisterAssetsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AssetsServiceServer) error
RegisterAssetsServiceHandlerServer registers the http handlers for service AssetsService to "mux". UnaryRPC :call AssetsServiceServer 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 RegisterAssetsServiceHandlerFromEndpoint instead.
func RegisterAssetsServiceServer ¶
func RegisterAssetsServiceServer(s grpc.ServiceRegistrar, srv AssetsServiceServer)
Types ¶
type AssetsServiceClient ¶
type AssetsServiceClient interface { // Retrieves assets data associated with the filters contained in the request // object. This endpoint will not return a not-found response if no assets // could be found to conform to the request, instead returning no data. QueryAssets(ctx context.Context, in *QueryAssetsRequest, opts ...grpc.CallOption) (AssetsService_QueryAssetsClient, error) // Retrieves a specific asset associated with its ticker symbol. This endpoint // will return a not-found response if no asset could be found to conform to the // symbol provided in the request. GetAsset(ctx context.Context, in *GetAssetRequest, opts ...grpc.CallOption) (*data.Asset, error) }
AssetsServiceClient is the client API for AssetsService 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 NewAssetsServiceClient ¶
func NewAssetsServiceClient(cc grpc.ClientConnInterface) AssetsServiceClient
type AssetsServiceServer ¶
type AssetsServiceServer interface { // Retrieves assets data associated with the filters contained in the request // object. This endpoint will not return a not-found response if no assets // could be found to conform to the request, instead returning no data. QueryAssets(*QueryAssetsRequest, AssetsService_QueryAssetsServer) error // Retrieves a specific asset associated with its ticker symbol. This endpoint // will return a not-found response if no asset could be found to conform to the // symbol provided in the request. GetAsset(context.Context, *GetAssetRequest) (*data.Asset, error) // contains filtered or unexported methods }
AssetsServiceServer is the server API for AssetsService service. All implementations must embed UnimplementedAssetsServiceServer for forward compatibility
type AssetsService_QueryAssetsClient ¶
type AssetsService_QueryAssetsClient interface { Recv() (*data.Asset, error) grpc.ClientStream }
type AssetsService_QueryAssetsServer ¶
type AssetsService_QueryAssetsServer interface { Send(*data.Asset) error grpc.ServerStream }
type GetAssetRequest ¶
type GetAssetRequest struct { // The provider for which we want to retrieve data. This parameter is required. ProviderId gopb.Provider `protobuf:"varint,1,opt,name=provider_id,json=providerId,proto3,enum=protos.common.Provider" json:"provider_id"` // The symbol to search for. This value is required. Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` // contains filtered or unexported fields }
Describes a request to retrieve a specific asset associated with a symbol
func (*GetAssetRequest) Descriptor
deprecated
func (*GetAssetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAssetRequest.ProtoReflect.Descriptor instead.
func (*GetAssetRequest) GetProviderId ¶ added in v1.2.30
func (x *GetAssetRequest) GetProviderId() gopb.Provider
func (*GetAssetRequest) GetSymbol ¶
func (x *GetAssetRequest) GetSymbol() string
func (*GetAssetRequest) ProtoMessage ¶
func (*GetAssetRequest) ProtoMessage()
func (*GetAssetRequest) ProtoReflect ¶
func (x *GetAssetRequest) ProtoReflect() protoreflect.Message
func (*GetAssetRequest) Reset ¶
func (x *GetAssetRequest) Reset()
func (*GetAssetRequest) String ¶
func (x *GetAssetRequest) String() string
type QueryAssetsRequest ¶
type QueryAssetsRequest struct { // The provider for which we want to retrieve data. This parameter is required. ProviderId gopb.Provider `protobuf:"varint,1,opt,name=provider_id,json=providerId,proto3,enum=protos.common.Provider" json:"provider_id"` // A string to search for in the name or symbol of an asset. If this value // is empty then it will be ignored. Search string `protobuf:"bytes,2,opt,name=search,proto3" json:"search,omitempty"` // The date from which to search for assets. This value, if provided, will act // as the value to be used for "now", so only assets that are not deactivated // at this time will be returned Date *gopb.UnixTimestamp `protobuf:"bytes,3,opt,name=date,proto3" json:"date"` // The asset type to search for. If this value is provided, then only assets // with the type provided will be returned from the endpoint. If an invalid // value of -1 is provided, then this filter will be ignored. Type gopb.Financial_Common_AssetType `protobuf:"varint,4,opt,name=type,proto3,enum=protos.common.Financial_Common_AssetType" json:"type"` // The asset class to search for. If this value is provided, then only assets // in the class provided will be returned from the endpoint. If an invalid value // of -1 is provided, then this filter will be ignored. Market gopb.Financial_Common_AssetClass `protobuf:"varint,5,opt,name=market,proto3,enum=protos.common.Financial_Common_AssetClass" json:"market"` // The locale to filter on. If this value is provided, then only assets located // in the locale provided will be returned from the endpoint Locale gopb.Financial_Common_Locale `protobuf:"varint,6,opt,name=locale,proto3,enum=protos.common.Financial_Common_Locale" json:"locale"` // An optional ISO exchange ID to use when filtering assets. An empty string // disables this filter. Exchange string `protobuf:"bytes,7,opt,name=exchange,proto3" json:"exchange,omitempty"` // The CIK of the asset you want to search for. An empty string disables this filter. Cik string `protobuf:"bytes,8,opt,name=cik,proto3" json:"cik,omitempty"` // Whether or not deactivated assets should be returned from the search. This // value defaults to false. AllowInactive bool `protobuf:"varint,9,opt,name=allow_inactive,json=allowInactive,proto3" json:"allow_inactive,omitempty"` // contains filtered or unexported fields }
Describes a request to query for any assets that conform to the filters that are enabled in the request
func (*QueryAssetsRequest) Descriptor
deprecated
func (*QueryAssetsRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryAssetsRequest.ProtoReflect.Descriptor instead.
func (*QueryAssetsRequest) GetAllowInactive ¶
func (x *QueryAssetsRequest) GetAllowInactive() bool
func (*QueryAssetsRequest) GetCik ¶
func (x *QueryAssetsRequest) GetCik() string
func (*QueryAssetsRequest) GetDate ¶
func (x *QueryAssetsRequest) GetDate() *gopb.UnixTimestamp
func (*QueryAssetsRequest) GetExchange ¶
func (x *QueryAssetsRequest) GetExchange() string
func (*QueryAssetsRequest) GetLocale ¶
func (x *QueryAssetsRequest) GetLocale() gopb.Financial_Common_Locale
func (*QueryAssetsRequest) GetMarket ¶
func (x *QueryAssetsRequest) GetMarket() gopb.Financial_Common_AssetClass
func (*QueryAssetsRequest) GetProviderId ¶ added in v1.2.30
func (x *QueryAssetsRequest) GetProviderId() gopb.Provider
func (*QueryAssetsRequest) GetSearch ¶
func (x *QueryAssetsRequest) GetSearch() string
func (*QueryAssetsRequest) GetType ¶
func (x *QueryAssetsRequest) GetType() gopb.Financial_Common_AssetType
func (*QueryAssetsRequest) ProtoMessage ¶
func (*QueryAssetsRequest) ProtoMessage()
func (*QueryAssetsRequest) ProtoReflect ¶
func (x *QueryAssetsRequest) ProtoReflect() protoreflect.Message
func (*QueryAssetsRequest) Reset ¶
func (x *QueryAssetsRequest) Reset()
func (*QueryAssetsRequest) String ¶
func (x *QueryAssetsRequest) String() string
type UnimplementedAssetsServiceServer ¶
type UnimplementedAssetsServiceServer struct { }
UnimplementedAssetsServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAssetsServiceServer) GetAsset ¶
func (UnimplementedAssetsServiceServer) GetAsset(context.Context, *GetAssetRequest) (*data.Asset, error)
func (UnimplementedAssetsServiceServer) QueryAssets ¶
func (UnimplementedAssetsServiceServer) QueryAssets(*QueryAssetsRequest, AssetsService_QueryAssetsServer) error
type UnsafeAssetsServiceServer ¶
type UnsafeAssetsServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAssetsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AssetsServiceServer will result in compilation errors.