Documentation ¶
Index ¶
- Variables
- func RegisterSaleServiceServer(s grpc.ServiceRegistrar, srv SaleServiceServer)
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetArchives() []*Sale
- func (x *Config) GetLastSaleRun() int64
- func (x *Config) GetPriceHistory() map[int32]*Prices
- func (x *Config) GetSales() []*Sale
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- type GetPriceRequest
- type GetPriceResponse
- func (*GetPriceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetPriceResponse) GetPrices() map[int32]*Prices
- func (*GetPriceResponse) ProtoMessage()
- func (x *GetPriceResponse) ProtoReflect() protoreflect.Message
- func (x *GetPriceResponse) Reset()
- func (x *GetPriceResponse) String() string
- type GetStaleRequest
- type GetStaleResponse
- type GetStateRequest
- type GetStateResponse
- type PriceHistory
- func (*PriceHistory) Descriptor() ([]byte, []int)deprecated
- func (x *PriceHistory) GetDate() int64
- func (x *PriceHistory) GetPrice() float32
- func (*PriceHistory) ProtoMessage()
- func (x *PriceHistory) ProtoReflect() protoreflect.Message
- func (x *PriceHistory) Reset()
- func (x *PriceHistory) String() string
- type Prices
- type Sale
- func (*Sale) Descriptor() ([]byte, []int)deprecated
- func (x *Sale) GetInstanceId() int32
- func (x *Sale) GetLastUpdateTime() int64
- func (x *Sale) GetNextProcessTime() int64
- func (x *Sale) GetOnHold() bool
- func (x *Sale) GetPrice() int32
- func (*Sale) ProtoMessage()
- func (x *Sale) ProtoReflect() protoreflect.Message
- func (x *Sale) Reset()
- func (x *Sale) String() string
- type SaleServiceClient
- type SaleServiceServer
- type UnimplementedSaleServiceServer
- func (UnimplementedSaleServiceServer) GetPrice(context.Context, *GetPriceRequest) (*GetPriceResponse, error)
- func (UnimplementedSaleServiceServer) GetSaleState(context.Context, *GetStateRequest) (*GetStateResponse, error)
- func (UnimplementedSaleServiceServer) GetStale(context.Context, *GetStaleRequest) (*GetStaleResponse, error)
- func (UnimplementedSaleServiceServer) UpdatePrice(context.Context, *UpdatePriceRequest) (*UpdatePriceResponse, error)
- type UnsafeSaleServiceServer
- type UpdatePriceRequest
- type UpdatePriceResponse
Constants ¶
This section is empty.
Variables ¶
var File_recordsales_proto protoreflect.FileDescriptor
var SaleService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "recordsales.SaleService", HandlerType: (*SaleServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetStale", Handler: _SaleService_GetStale_Handler, }, { MethodName: "GetSaleState", Handler: _SaleService_GetSaleState_Handler, }, { MethodName: "UpdatePrice", Handler: _SaleService_UpdatePrice_Handler, }, { MethodName: "GetPrice", Handler: _SaleService_GetPrice_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "recordsales.proto", }
SaleService_ServiceDesc is the grpc.ServiceDesc for SaleService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSaleServiceServer ¶
func RegisterSaleServiceServer(s grpc.ServiceRegistrar, srv SaleServiceServer)
Types ¶
type Config ¶
type Config struct { Sales []*Sale `protobuf:"bytes,1,rep,name=sales,proto3" json:"sales,omitempty"` Archives []*Sale `protobuf:"bytes,2,rep,name=archives,proto3" json:"archives,omitempty"` LastSaleRun int64 `protobuf:"varint,3,opt,name=last_sale_run,json=lastSaleRun,proto3" json:"last_sale_run,omitempty"` PriceHistory map[int32]*Prices `` /* 186-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetArchives ¶
func (*Config) GetLastSaleRun ¶
func (*Config) GetPriceHistory ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type GetPriceRequest ¶
type GetPriceRequest struct { Ids []int32 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*GetPriceRequest) Descriptor
deprecated
func (*GetPriceRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPriceRequest.ProtoReflect.Descriptor instead.
func (*GetPriceRequest) GetIds ¶
func (x *GetPriceRequest) GetIds() []int32
func (*GetPriceRequest) ProtoMessage ¶
func (*GetPriceRequest) ProtoMessage()
func (*GetPriceRequest) ProtoReflect ¶
func (x *GetPriceRequest) ProtoReflect() protoreflect.Message
func (*GetPriceRequest) Reset ¶
func (x *GetPriceRequest) Reset()
func (*GetPriceRequest) String ¶
func (x *GetPriceRequest) String() string
type GetPriceResponse ¶
type GetPriceResponse struct { Prices map[int32]*Prices `` /* 154-byte string literal not displayed */ // contains filtered or unexported fields }
func (*GetPriceResponse) Descriptor
deprecated
func (*GetPriceResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPriceResponse.ProtoReflect.Descriptor instead.
func (*GetPriceResponse) GetPrices ¶
func (x *GetPriceResponse) GetPrices() map[int32]*Prices
func (*GetPriceResponse) ProtoMessage ¶
func (*GetPriceResponse) ProtoMessage()
func (*GetPriceResponse) ProtoReflect ¶
func (x *GetPriceResponse) ProtoReflect() protoreflect.Message
func (*GetPriceResponse) Reset ¶
func (x *GetPriceResponse) Reset()
func (*GetPriceResponse) String ¶
func (x *GetPriceResponse) String() string
type GetStaleRequest ¶
type GetStaleRequest struct {
// contains filtered or unexported fields
}
func (*GetStaleRequest) Descriptor
deprecated
func (*GetStaleRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetStaleRequest.ProtoReflect.Descriptor instead.
func (*GetStaleRequest) ProtoMessage ¶
func (*GetStaleRequest) ProtoMessage()
func (*GetStaleRequest) ProtoReflect ¶
func (x *GetStaleRequest) ProtoReflect() protoreflect.Message
func (*GetStaleRequest) Reset ¶
func (x *GetStaleRequest) Reset()
func (*GetStaleRequest) String ¶
func (x *GetStaleRequest) String() string
type GetStaleResponse ¶
type GetStaleResponse struct { StaleSales []*Sale `protobuf:"bytes,1,rep,name=stale_sales,json=staleSales,proto3" json:"stale_sales,omitempty"` // contains filtered or unexported fields }
func (*GetStaleResponse) Descriptor
deprecated
func (*GetStaleResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetStaleResponse.ProtoReflect.Descriptor instead.
func (*GetStaleResponse) GetStaleSales ¶
func (x *GetStaleResponse) GetStaleSales() []*Sale
func (*GetStaleResponse) ProtoMessage ¶
func (*GetStaleResponse) ProtoMessage()
func (*GetStaleResponse) ProtoReflect ¶
func (x *GetStaleResponse) ProtoReflect() protoreflect.Message
func (*GetStaleResponse) Reset ¶
func (x *GetStaleResponse) Reset()
func (*GetStaleResponse) String ¶
func (x *GetStaleResponse) String() string
type GetStateRequest ¶
type GetStateRequest struct { InstanceId int32 `protobuf:"varint,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` // contains filtered or unexported fields }
func (*GetStateRequest) Descriptor
deprecated
func (*GetStateRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetStateRequest.ProtoReflect.Descriptor instead.
func (*GetStateRequest) GetInstanceId ¶
func (x *GetStateRequest) GetInstanceId() int32
func (*GetStateRequest) ProtoMessage ¶
func (*GetStateRequest) ProtoMessage()
func (*GetStateRequest) ProtoReflect ¶
func (x *GetStateRequest) ProtoReflect() protoreflect.Message
func (*GetStateRequest) Reset ¶
func (x *GetStateRequest) Reset()
func (*GetStateRequest) String ¶
func (x *GetStateRequest) String() string
type GetStateResponse ¶
type GetStateResponse struct { Sales []*Sale `protobuf:"bytes,1,rep,name=sales,proto3" json:"sales,omitempty"` // contains filtered or unexported fields }
func (*GetStateResponse) Descriptor
deprecated
func (*GetStateResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetStateResponse.ProtoReflect.Descriptor instead.
func (*GetStateResponse) GetSales ¶
func (x *GetStateResponse) GetSales() []*Sale
func (*GetStateResponse) ProtoMessage ¶
func (*GetStateResponse) ProtoMessage()
func (*GetStateResponse) ProtoReflect ¶
func (x *GetStateResponse) ProtoReflect() protoreflect.Message
func (*GetStateResponse) Reset ¶
func (x *GetStateResponse) Reset()
func (*GetStateResponse) String ¶
func (x *GetStateResponse) String() string
type PriceHistory ¶
type PriceHistory struct { Date int64 `protobuf:"varint,1,opt,name=date,proto3" json:"date,omitempty"` Price float32 `protobuf:"fixed32,2,opt,name=price,proto3" json:"price,omitempty"` // contains filtered or unexported fields }
func (*PriceHistory) Descriptor
deprecated
func (*PriceHistory) Descriptor() ([]byte, []int)
Deprecated: Use PriceHistory.ProtoReflect.Descriptor instead.
func (*PriceHistory) GetDate ¶
func (x *PriceHistory) GetDate() int64
func (*PriceHistory) GetPrice ¶
func (x *PriceHistory) GetPrice() float32
func (*PriceHistory) ProtoMessage ¶
func (*PriceHistory) ProtoMessage()
func (*PriceHistory) ProtoReflect ¶
func (x *PriceHistory) ProtoReflect() protoreflect.Message
func (*PriceHistory) Reset ¶
func (x *PriceHistory) Reset()
func (*PriceHistory) String ¶
func (x *PriceHistory) String() string
type Prices ¶
type Prices struct { History []*PriceHistory `protobuf:"bytes,1,rep,name=history,proto3" json:"history,omitempty"` Latest *PriceHistory `protobuf:"bytes,2,opt,name=latest,proto3" json:"latest,omitempty"` // contains filtered or unexported fields }
func (*Prices) Descriptor
deprecated
func (*Prices) GetHistory ¶
func (x *Prices) GetHistory() []*PriceHistory
func (*Prices) GetLatest ¶
func (x *Prices) GetLatest() *PriceHistory
func (*Prices) ProtoMessage ¶
func (*Prices) ProtoMessage()
func (*Prices) ProtoReflect ¶
func (x *Prices) ProtoReflect() protoreflect.Message
type Sale ¶
type Sale struct { InstanceId int32 `protobuf:"varint,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` LastUpdateTime int64 `protobuf:"varint,2,opt,name=last_update_time,json=lastUpdateTime,proto3" json:"last_update_time,omitempty"` Price int32 `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"` OnHold bool `protobuf:"varint,4,opt,name=on_hold,json=onHold,proto3" json:"on_hold,omitempty"` NextProcessTime int64 `protobuf:"varint,5,opt,name=next_process_time,json=nextProcessTime,proto3" json:"next_process_time,omitempty"` // contains filtered or unexported fields }
func (*Sale) Descriptor
deprecated
func (*Sale) GetInstanceId ¶
func (*Sale) GetLastUpdateTime ¶
func (*Sale) GetNextProcessTime ¶
func (*Sale) ProtoMessage ¶
func (*Sale) ProtoMessage()
func (*Sale) ProtoReflect ¶
func (x *Sale) ProtoReflect() protoreflect.Message
type SaleServiceClient ¶
type SaleServiceClient interface { GetStale(ctx context.Context, in *GetStaleRequest, opts ...grpc.CallOption) (*GetStaleResponse, error) GetSaleState(ctx context.Context, in *GetStateRequest, opts ...grpc.CallOption) (*GetStateResponse, error) UpdatePrice(ctx context.Context, in *UpdatePriceRequest, opts ...grpc.CallOption) (*UpdatePriceResponse, error) GetPrice(ctx context.Context, in *GetPriceRequest, opts ...grpc.CallOption) (*GetPriceResponse, error) }
SaleServiceClient is the client API for SaleService 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 NewSaleServiceClient ¶
func NewSaleServiceClient(cc grpc.ClientConnInterface) SaleServiceClient
type SaleServiceServer ¶
type SaleServiceServer interface { GetStale(context.Context, *GetStaleRequest) (*GetStaleResponse, error) GetSaleState(context.Context, *GetStateRequest) (*GetStateResponse, error) UpdatePrice(context.Context, *UpdatePriceRequest) (*UpdatePriceResponse, error) GetPrice(context.Context, *GetPriceRequest) (*GetPriceResponse, error) }
SaleServiceServer is the server API for SaleService service. All implementations should embed UnimplementedSaleServiceServer for forward compatibility
type UnimplementedSaleServiceServer ¶
type UnimplementedSaleServiceServer struct { }
UnimplementedSaleServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedSaleServiceServer) GetPrice ¶
func (UnimplementedSaleServiceServer) GetPrice(context.Context, *GetPriceRequest) (*GetPriceResponse, error)
func (UnimplementedSaleServiceServer) GetSaleState ¶
func (UnimplementedSaleServiceServer) GetSaleState(context.Context, *GetStateRequest) (*GetStateResponse, error)
func (UnimplementedSaleServiceServer) GetStale ¶
func (UnimplementedSaleServiceServer) GetStale(context.Context, *GetStaleRequest) (*GetStaleResponse, error)
func (UnimplementedSaleServiceServer) UpdatePrice ¶
func (UnimplementedSaleServiceServer) UpdatePrice(context.Context, *UpdatePriceRequest) (*UpdatePriceResponse, error)
type UnsafeSaleServiceServer ¶
type UnsafeSaleServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSaleServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SaleServiceServer will result in compilation errors.
type UpdatePriceRequest ¶
type UpdatePriceRequest struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*UpdatePriceRequest) Descriptor
deprecated
func (*UpdatePriceRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePriceRequest.ProtoReflect.Descriptor instead.
func (*UpdatePriceRequest) GetId ¶
func (x *UpdatePriceRequest) GetId() int32
func (*UpdatePriceRequest) ProtoMessage ¶
func (*UpdatePriceRequest) ProtoMessage()
func (*UpdatePriceRequest) ProtoReflect ¶
func (x *UpdatePriceRequest) ProtoReflect() protoreflect.Message
func (*UpdatePriceRequest) Reset ¶
func (x *UpdatePriceRequest) Reset()
func (*UpdatePriceRequest) String ¶
func (x *UpdatePriceRequest) String() string
type UpdatePriceResponse ¶
type UpdatePriceResponse struct {
// contains filtered or unexported fields
}
func (*UpdatePriceResponse) Descriptor
deprecated
func (*UpdatePriceResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePriceResponse.ProtoReflect.Descriptor instead.
func (*UpdatePriceResponse) ProtoMessage ¶
func (*UpdatePriceResponse) ProtoMessage()
func (*UpdatePriceResponse) ProtoReflect ¶
func (x *UpdatePriceResponse) ProtoReflect() protoreflect.Message
func (*UpdatePriceResponse) Reset ¶
func (x *UpdatePriceResponse) Reset()
func (*UpdatePriceResponse) String ¶
func (x *UpdatePriceResponse) String() string