proto

package
v0.0.0-...-735edaa Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_recordsales_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetArchives

func (x *Config) GetArchives() []*Sale

func (*Config) GetLastSaleRun

func (x *Config) GetLastSaleRun() int64

func (*Config) GetPriceHistory

func (x *Config) GetPriceHistory() map[int32]*Prices

func (*Config) GetSales

func (x *Config) GetSales() []*Sale

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Prices.ProtoReflect.Descriptor instead.

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

func (*Prices) Reset

func (x *Prices) Reset()

func (*Prices) String

func (x *Prices) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Sale.ProtoReflect.Descriptor instead.

func (*Sale) GetInstanceId

func (x *Sale) GetInstanceId() int32

func (*Sale) GetLastUpdateTime

func (x *Sale) GetLastUpdateTime() int64

func (*Sale) GetNextProcessTime

func (x *Sale) GetNextProcessTime() int64

func (*Sale) GetOnHold

func (x *Sale) GetOnHold() bool

func (*Sale) GetPrice

func (x *Sale) GetPrice() int32

func (*Sale) ProtoMessage

func (*Sale) ProtoMessage()

func (*Sale) ProtoReflect

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

func (*Sale) Reset

func (x *Sale) Reset()

func (*Sale) String

func (x *Sale) String() string

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.

type SaleServiceServer

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) GetSaleState

func (UnimplementedSaleServiceServer) GetStale

func (UnimplementedSaleServiceServer) UpdatePrice

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

Jump to

Keyboard shortcuts

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