injective_oracle_rpcpb

package
v1.33.12 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_injective_oracle_rpc_proto protoreflect.FileDescriptor
View Source
var InjectiveOracleRPC_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "injective_oracle_rpc.InjectiveOracleRPC",
	HandlerType: (*InjectiveOracleRPCServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "OracleList",
			Handler:    _InjectiveOracleRPC_OracleList_Handler,
		},
		{
			MethodName: "Price",
			Handler:    _InjectiveOracleRPC_Price_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamPrices",
			Handler:       _InjectiveOracleRPC_StreamPrices_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "injective_oracle_rpc.proto",
}

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

Functions

func RegisterInjectiveOracleRPCServer

func RegisterInjectiveOracleRPCServer(s grpc.ServiceRegistrar, srv InjectiveOracleRPCServer)

Types

type InjectiveOracleRPCClient

type InjectiveOracleRPCClient interface {
	// List all oracles
	OracleList(ctx context.Context, in *OracleListRequest, opts ...grpc.CallOption) (*OracleListResponse, error)
	// Gets the price of the oracle
	Price(ctx context.Context, in *PriceRequest, opts ...grpc.CallOption) (*PriceResponse, error)
	// StreamPrices streams new price changes for a specified oracle. If no oracles
	// are provided, all price changes are streamed.
	StreamPrices(ctx context.Context, in *StreamPricesRequest, opts ...grpc.CallOption) (InjectiveOracleRPC_StreamPricesClient, error)
}

InjectiveOracleRPCClient is the client API for InjectiveOracleRPC 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.

type InjectiveOracleRPCServer

type InjectiveOracleRPCServer interface {
	// List all oracles
	OracleList(context.Context, *OracleListRequest) (*OracleListResponse, error)
	// Gets the price of the oracle
	Price(context.Context, *PriceRequest) (*PriceResponse, error)
	// StreamPrices streams new price changes for a specified oracle. If no oracles
	// are provided, all price changes are streamed.
	StreamPrices(*StreamPricesRequest, InjectiveOracleRPC_StreamPricesServer) error
	// contains filtered or unexported methods
}

InjectiveOracleRPCServer is the server API for InjectiveOracleRPC service. All implementations must embed UnimplementedInjectiveOracleRPCServer for forward compatibility

type InjectiveOracleRPC_StreamPricesClient

type InjectiveOracleRPC_StreamPricesClient interface {
	Recv() (*StreamPricesResponse, error)
	grpc.ClientStream
}

type InjectiveOracleRPC_StreamPricesServer

type InjectiveOracleRPC_StreamPricesServer interface {
	Send(*StreamPricesResponse) error
	grpc.ServerStream
}

type Oracle

type Oracle struct {

	// The symbol of the oracle asset.
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// Oracle base currency
	BaseSymbol string `protobuf:"bytes,2,opt,name=base_symbol,json=baseSymbol,proto3" json:"base_symbol,omitempty"`
	// Oracle quote currency
	QuoteSymbol string `protobuf:"bytes,3,opt,name=quote_symbol,json=quoteSymbol,proto3" json:"quote_symbol,omitempty"`
	// Oracle Type
	OracleType string `protobuf:"bytes,4,opt,name=oracle_type,json=oracleType,proto3" json:"oracle_type,omitempty"`
	// The price of the oracle asset
	Price string `protobuf:"bytes,5,opt,name=price,proto3" json:"price,omitempty"`
	// contains filtered or unexported fields
}

func (*Oracle) Descriptor deprecated

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

Deprecated: Use Oracle.ProtoReflect.Descriptor instead.

func (*Oracle) GetBaseSymbol

func (x *Oracle) GetBaseSymbol() string

func (*Oracle) GetOracleType

func (x *Oracle) GetOracleType() string

func (*Oracle) GetPrice

func (x *Oracle) GetPrice() string

func (*Oracle) GetQuoteSymbol

func (x *Oracle) GetQuoteSymbol() string

func (*Oracle) GetSymbol

func (x *Oracle) GetSymbol() string

func (*Oracle) ProtoMessage

func (*Oracle) ProtoMessage()

func (*Oracle) ProtoReflect

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

func (*Oracle) Reset

func (x *Oracle) Reset()

func (*Oracle) String

func (x *Oracle) String() string

type OracleListRequest

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

func (*OracleListRequest) Descriptor deprecated

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

Deprecated: Use OracleListRequest.ProtoReflect.Descriptor instead.

func (*OracleListRequest) ProtoMessage

func (*OracleListRequest) ProtoMessage()

func (*OracleListRequest) ProtoReflect

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

func (*OracleListRequest) Reset

func (x *OracleListRequest) Reset()

func (*OracleListRequest) String

func (x *OracleListRequest) String() string

type OracleListResponse

type OracleListResponse struct {
	Oracles []*Oracle `protobuf:"bytes,1,rep,name=oracles,proto3" json:"oracles,omitempty"`
	// contains filtered or unexported fields
}

func (*OracleListResponse) Descriptor deprecated

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

Deprecated: Use OracleListResponse.ProtoReflect.Descriptor instead.

func (*OracleListResponse) GetOracles

func (x *OracleListResponse) GetOracles() []*Oracle

func (*OracleListResponse) ProtoMessage

func (*OracleListResponse) ProtoMessage()

func (*OracleListResponse) ProtoReflect

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

func (*OracleListResponse) Reset

func (x *OracleListResponse) Reset()

func (*OracleListResponse) String

func (x *OracleListResponse) String() string

type PriceRequest

type PriceRequest struct {

	// Oracle base currency
	BaseSymbol string `protobuf:"bytes,1,opt,name=base_symbol,json=baseSymbol,proto3" json:"base_symbol,omitempty"`
	// Oracle quote currency
	QuoteSymbol string `protobuf:"bytes,2,opt,name=quote_symbol,json=quoteSymbol,proto3" json:"quote_symbol,omitempty"`
	// Oracle Type
	OracleType string `protobuf:"bytes,3,opt,name=oracle_type,json=oracleType,proto3" json:"oracle_type,omitempty"`
	// OracleScaleFactor
	OracleScaleFactor uint32 `protobuf:"varint,4,opt,name=oracle_scale_factor,json=oracleScaleFactor,proto3" json:"oracle_scale_factor,omitempty"`
	// contains filtered or unexported fields
}

func (*PriceRequest) Descriptor deprecated

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

Deprecated: Use PriceRequest.ProtoReflect.Descriptor instead.

func (*PriceRequest) GetBaseSymbol

func (x *PriceRequest) GetBaseSymbol() string

func (*PriceRequest) GetOracleScaleFactor

func (x *PriceRequest) GetOracleScaleFactor() uint32

func (*PriceRequest) GetOracleType

func (x *PriceRequest) GetOracleType() string

func (*PriceRequest) GetQuoteSymbol

func (x *PriceRequest) GetQuoteSymbol() string

func (*PriceRequest) ProtoMessage

func (*PriceRequest) ProtoMessage()

func (*PriceRequest) ProtoReflect

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

func (*PriceRequest) Reset

func (x *PriceRequest) Reset()

func (*PriceRequest) String

func (x *PriceRequest) String() string

type PriceResponse

type PriceResponse struct {

	// The price of the oracle asset
	Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"`
	// contains filtered or unexported fields
}

func (*PriceResponse) Descriptor deprecated

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

Deprecated: Use PriceResponse.ProtoReflect.Descriptor instead.

func (*PriceResponse) GetPrice

func (x *PriceResponse) GetPrice() string

func (*PriceResponse) ProtoMessage

func (*PriceResponse) ProtoMessage()

func (*PriceResponse) ProtoReflect

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

func (*PriceResponse) Reset

func (x *PriceResponse) Reset()

func (*PriceResponse) String

func (x *PriceResponse) String() string

type StreamPricesRequest

type StreamPricesRequest struct {

	// Oracle base currency
	BaseSymbol string `protobuf:"bytes,1,opt,name=base_symbol,json=baseSymbol,proto3" json:"base_symbol,omitempty"`
	// Oracle quote currency
	QuoteSymbol string `protobuf:"bytes,2,opt,name=quote_symbol,json=quoteSymbol,proto3" json:"quote_symbol,omitempty"`
	// Oracle Type
	OracleType string `protobuf:"bytes,3,opt,name=oracle_type,json=oracleType,proto3" json:"oracle_type,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamPricesRequest) Descriptor deprecated

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

Deprecated: Use StreamPricesRequest.ProtoReflect.Descriptor instead.

func (*StreamPricesRequest) GetBaseSymbol

func (x *StreamPricesRequest) GetBaseSymbol() string

func (*StreamPricesRequest) GetOracleType

func (x *StreamPricesRequest) GetOracleType() string

func (*StreamPricesRequest) GetQuoteSymbol

func (x *StreamPricesRequest) GetQuoteSymbol() string

func (*StreamPricesRequest) ProtoMessage

func (*StreamPricesRequest) ProtoMessage()

func (*StreamPricesRequest) ProtoReflect

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

func (*StreamPricesRequest) Reset

func (x *StreamPricesRequest) Reset()

func (*StreamPricesRequest) String

func (x *StreamPricesRequest) String() string

type StreamPricesResponse

type StreamPricesResponse struct {

	// The price of the oracle asset
	Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"`
	// Operation timestamp in UNIX millis.
	Timestamp int64 `protobuf:"zigzag64,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamPricesResponse) Descriptor deprecated

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

Deprecated: Use StreamPricesResponse.ProtoReflect.Descriptor instead.

func (*StreamPricesResponse) GetPrice

func (x *StreamPricesResponse) GetPrice() string

func (*StreamPricesResponse) GetTimestamp

func (x *StreamPricesResponse) GetTimestamp() int64

func (*StreamPricesResponse) ProtoMessage

func (*StreamPricesResponse) ProtoMessage()

func (*StreamPricesResponse) ProtoReflect

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

func (*StreamPricesResponse) Reset

func (x *StreamPricesResponse) Reset()

func (*StreamPricesResponse) String

func (x *StreamPricesResponse) String() string

type UnimplementedInjectiveOracleRPCServer

type UnimplementedInjectiveOracleRPCServer struct {
}

UnimplementedInjectiveOracleRPCServer must be embedded to have forward compatible implementations.

func (UnimplementedInjectiveOracleRPCServer) OracleList

func (UnimplementedInjectiveOracleRPCServer) Price

func (UnimplementedInjectiveOracleRPCServer) StreamPrices

type UnsafeInjectiveOracleRPCServer

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

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

Jump to

Keyboard shortcuts

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