Documentation
¶
Index ¶
- Constants
- func RegisterEventStoreServer(s *grpc.Server, srv EventStoreServer)
- func RegisterItemStoreServer(s *grpc.Server, srv ItemStoreServer)
- type Event
- func (*Event) Descriptor() ([]byte, []int)
- func (m *Event) GetAggregateId() string
- func (m *Event) GetAggregateType() string
- func (m *Event) GetChannel() string
- func (m *Event) GetEventData() string
- func (m *Event) GetEventId() string
- func (m *Event) GetEventType() string
- func (*Event) ProtoMessage()
- func (m *Event) Reset()
- func (m *Event) String() string
- func (m *Event) XXX_DiscardUnknown()
- func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Event) XXX_Merge(src proto.Message)
- func (m *Event) XXX_Size() int
- func (m *Event) XXX_Unmarshal(b []byte) error
- type EventFilter
- func (*EventFilter) Descriptor() ([]byte, []int)
- func (m *EventFilter) GetAggregateId() string
- func (m *EventFilter) GetEventId() string
- func (*EventFilter) ProtoMessage()
- func (m *EventFilter) Reset()
- func (m *EventFilter) String() string
- func (m *EventFilter) XXX_DiscardUnknown()
- func (m *EventFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventFilter) XXX_Merge(src proto.Message)
- func (m *EventFilter) XXX_Size() int
- func (m *EventFilter) XXX_Unmarshal(b []byte) error
- type EventResponse
- func (*EventResponse) Descriptor() ([]byte, []int)
- func (m *EventResponse) GetEvents() []*Event
- func (*EventResponse) ProtoMessage()
- func (m *EventResponse) Reset()
- func (m *EventResponse) String() string
- func (m *EventResponse) XXX_DiscardUnknown()
- func (m *EventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventResponse) XXX_Merge(src proto.Message)
- func (m *EventResponse) XXX_Size() int
- func (m *EventResponse) XXX_Unmarshal(b []byte) error
- type EventStoreClient
- type EventStoreServer
- type IEventDatabase
- type IItemDatabase
- type IPriceDatabase
- type IdbMysql
- type Item
- func (*Item) Descriptor() ([]byte, []int)
- func (m *Item) GetDescription() string
- func (m *Item) GetID() uint32
- func (m *Item) GetIcon() string
- func (m *Item) GetLevel() uint32
- func (m *Item) GetName() string
- func (m *Item) GetRarity() string
- func (m *Item) GetType() string
- func (m *Item) GetVendorValue() uint32
- func (*Item) ProtoMessage()
- func (m *Item) Reset()
- func (m *Item) String() string
- func (m *Item) XXX_DiscardUnknown()
- func (m *Item) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Item) XXX_Merge(src proto.Message)
- func (m *Item) XXX_Size() int
- func (m *Item) XXX_Unmarshal(b []byte) error
- type ItemBatch
- func (*ItemBatch) Descriptor() ([]byte, []int)
- func (m *ItemBatch) GetBatchUUID() string
- func (m *ItemBatch) GetItemData() []byte
- func (*ItemBatch) ProtoMessage()
- func (m *ItemBatch) Reset()
- func (m *ItemBatch) String() string
- func (m *ItemBatch) XXX_DiscardUnknown()
- func (m *ItemBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ItemBatch) XXX_Merge(src proto.Message)
- func (m *ItemBatch) XXX_Size() int
- func (m *ItemBatch) XXX_Unmarshal(b []byte) error
- type ItemIdsRequest
- func (*ItemIdsRequest) Descriptor() ([]byte, []int)
- func (m *ItemIdsRequest) GetBatchUUID() string
- func (m *ItemIdsRequest) GetItemIds() []uint32
- func (*ItemIdsRequest) ProtoMessage()
- func (m *ItemIdsRequest) Reset()
- func (m *ItemIdsRequest) String() string
- func (m *ItemIdsRequest) XXX_DiscardUnknown()
- func (m *ItemIdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ItemIdsRequest) XXX_Merge(src proto.Message)
- func (m *ItemIdsRequest) XXX_Size() int
- func (m *ItemIdsRequest) XXX_Unmarshal(b []byte) error
- type ItemResponse
- func (*ItemResponse) Descriptor() ([]byte, []int)
- func (m *ItemResponse) GetItemId() uint32
- func (*ItemResponse) ProtoMessage()
- func (m *ItemResponse) Reset()
- func (m *ItemResponse) String() string
- func (m *ItemResponse) XXX_DiscardUnknown()
- func (m *ItemResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ItemResponse) XXX_Merge(src proto.Message)
- func (m *ItemResponse) XXX_Size() int
- func (m *ItemResponse) XXX_Unmarshal(b []byte) error
- type ItemStoreClient
- type ItemStoreServer
- type Listings
- func (*Listings) Descriptor() ([]byte, []int)
- func (m *Listings) GetBuys() []*Listings_BUYS
- func (m *Listings) GetId() int32
- func (m *Listings) GetSells() []*Listings_SELLS
- func (*Listings) ProtoMessage()
- func (m *Listings) Reset()
- func (m *Listings) String() string
- func (m *Listings) XXX_DiscardUnknown()
- func (m *Listings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Listings) XXX_Merge(src proto.Message)
- func (m *Listings) XXX_Size() int
- func (m *Listings) XXX_Unmarshal(b []byte) error
- type Listings_BUYS
- func (*Listings_BUYS) Descriptor() ([]byte, []int)
- func (m *Listings_BUYS) GetListings() int32
- func (m *Listings_BUYS) GetQuantity() int32
- func (m *Listings_BUYS) GetUnitPrice() int32
- func (*Listings_BUYS) ProtoMessage()
- func (m *Listings_BUYS) Reset()
- func (m *Listings_BUYS) String() string
- func (m *Listings_BUYS) XXX_DiscardUnknown()
- func (m *Listings_BUYS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Listings_BUYS) XXX_Merge(src proto.Message)
- func (m *Listings_BUYS) XXX_Size() int
- func (m *Listings_BUYS) XXX_Unmarshal(b []byte) error
- type Listings_SELLS
- func (*Listings_SELLS) Descriptor() ([]byte, []int)
- func (m *Listings_SELLS) GetListings() int32
- func (m *Listings_SELLS) GetQuantity() int32
- func (m *Listings_SELLS) GetUnitPrice() int32
- func (*Listings_SELLS) ProtoMessage()
- func (m *Listings_SELLS) Reset()
- func (m *Listings_SELLS) String() string
- func (m *Listings_SELLS) XXX_DiscardUnknown()
- func (m *Listings_SELLS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Listings_SELLS) XXX_Merge(src proto.Message)
- func (m *Listings_SELLS) XXX_Size() int
- func (m *Listings_SELLS) XXX_Unmarshal(b []byte) error
- type MySQLConfig
- type MySQLConn
- type Prices
- func (*Prices) Descriptor() ([]byte, []int)
- func (m *Prices) GetAggregateId() string
- func (m *Prices) GetBuys() *Prices_BUYS
- func (m *Prices) GetFetchDatetime() int64
- func (m *Prices) GetId() uint32
- func (m *Prices) GetSells() *Prices_SELLS
- func (m *Prices) GetWhitelisted() bool
- func (*Prices) ProtoMessage()
- func (m *Prices) Reset()
- func (m *Prices) String() string
- func (m *Prices) XXX_DiscardUnknown()
- func (m *Prices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Prices) XXX_Merge(src proto.Message)
- func (m *Prices) XXX_Size() int
- func (m *Prices) XXX_Unmarshal(b []byte) error
- type PricesRequest
- func (*PricesRequest) Descriptor() ([]byte, []int)
- func (m *PricesRequest) GetPage() uint32
- func (m *PricesRequest) GetPageSize() uint32
- func (*PricesRequest) ProtoMessage()
- func (m *PricesRequest) Reset()
- func (m *PricesRequest) String() string
- func (m *PricesRequest) XXX_DiscardUnknown()
- func (m *PricesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PricesRequest) XXX_Merge(src proto.Message)
- func (m *PricesRequest) XXX_Size() int
- func (m *PricesRequest) XXX_Unmarshal(b []byte) error
- type Prices_BUYS
- func (*Prices_BUYS) Descriptor() ([]byte, []int)
- func (m *Prices_BUYS) GetQuantity() uint32
- func (m *Prices_BUYS) GetUnitPrice() uint32
- func (*Prices_BUYS) ProtoMessage()
- func (m *Prices_BUYS) Reset()
- func (m *Prices_BUYS) String() string
- func (m *Prices_BUYS) XXX_DiscardUnknown()
- func (m *Prices_BUYS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Prices_BUYS) XXX_Merge(src proto.Message)
- func (m *Prices_BUYS) XXX_Size() int
- func (m *Prices_BUYS) XXX_Unmarshal(b []byte) error
- type Prices_SELLS
- func (*Prices_SELLS) Descriptor() ([]byte, []int)
- func (m *Prices_SELLS) GetQuantity() uint32
- func (m *Prices_SELLS) GetUnitPrice() uint32
- func (*Prices_SELLS) ProtoMessage()
- func (m *Prices_SELLS) Reset()
- func (m *Prices_SELLS) String() string
- func (m *Prices_SELLS) XXX_DiscardUnknown()
- func (m *Prices_SELLS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Prices_SELLS) XXX_Merge(src proto.Message)
- func (m *Prices_SELLS) XXX_Size() int
- func (m *Prices_SELLS) XXX_Unmarshal(b []byte) error
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetError() string
- func (m *Response) GetIsSuccess() bool
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
- type UnimplementedEventStoreServer
- type UnimplementedItemStoreServer
Constants ¶
const InsertEventStatement = `INSERT INTO events (id, eventtype, aggregateid, aggregatetype, eventdata, channel) VALUES ($1, $2, $3, $4, $5, $6)`
const InsertItemStatement = `` /* 134-byte string literal not displayed */
TODO Ignoring duplication error for now, check before inserting if exists or values changes?
const InsertPriceNowStatement = `` /* 147-byte string literal not displayed */
const InsertPriceStatement = `` /* 136-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func RegisterEventStoreServer ¶
func RegisterEventStoreServer(s *grpc.Server, srv EventStoreServer)
func RegisterItemStoreServer ¶
func RegisterItemStoreServer(s *grpc.Server, srv ItemStoreServer)
Types ¶
type Event ¶
type Event struct { EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` EventType string `protobuf:"bytes,2,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` AggregateId string `protobuf:"bytes,3,opt,name=aggregate_id,json=aggregateId,proto3" json:"aggregate_id,omitempty"` AggregateType string `protobuf:"bytes,4,opt,name=aggregate_type,json=aggregateType,proto3" json:"aggregate_type,omitempty"` EventData string `protobuf:"bytes,5,opt,name=event_data,json=eventData,proto3" json:"event_data,omitempty"` Channel string `protobuf:"bytes,6,opt,name=channel,proto3" json:"channel,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Event) Descriptor ¶
func (*Event) GetAggregateId ¶
func (*Event) GetAggregateType ¶
func (*Event) GetChannel ¶
func (*Event) GetEventData ¶
func (*Event) GetEventId ¶
func (*Event) GetEventType ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) XXX_DiscardUnknown ¶
func (m *Event) XXX_DiscardUnknown()
func (*Event) XXX_Marshal ¶
func (*Event) XXX_Unmarshal ¶
type EventFilter ¶
type EventFilter struct { EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` AggregateId string `protobuf:"bytes,2,opt,name=aggregate_id,json=aggregateId,proto3" json:"aggregate_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*EventFilter) Descriptor ¶
func (*EventFilter) Descriptor() ([]byte, []int)
func (*EventFilter) GetAggregateId ¶
func (m *EventFilter) GetAggregateId() string
func (*EventFilter) GetEventId ¶
func (m *EventFilter) GetEventId() string
func (*EventFilter) ProtoMessage ¶
func (*EventFilter) ProtoMessage()
func (*EventFilter) Reset ¶
func (m *EventFilter) Reset()
func (*EventFilter) String ¶
func (m *EventFilter) String() string
func (*EventFilter) XXX_DiscardUnknown ¶
func (m *EventFilter) XXX_DiscardUnknown()
func (*EventFilter) XXX_Marshal ¶
func (m *EventFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventFilter) XXX_Merge ¶
func (m *EventFilter) XXX_Merge(src proto.Message)
func (*EventFilter) XXX_Size ¶
func (m *EventFilter) XXX_Size() int
func (*EventFilter) XXX_Unmarshal ¶
func (m *EventFilter) XXX_Unmarshal(b []byte) error
type EventResponse ¶
type EventResponse struct { Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*EventResponse) Descriptor ¶
func (*EventResponse) Descriptor() ([]byte, []int)
func (*EventResponse) GetEvents ¶
func (m *EventResponse) GetEvents() []*Event
func (*EventResponse) ProtoMessage ¶
func (*EventResponse) ProtoMessage()
func (*EventResponse) Reset ¶
func (m *EventResponse) Reset()
func (*EventResponse) String ¶
func (m *EventResponse) String() string
func (*EventResponse) XXX_DiscardUnknown ¶
func (m *EventResponse) XXX_DiscardUnknown()
func (*EventResponse) XXX_Marshal ¶
func (m *EventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventResponse) XXX_Merge ¶
func (m *EventResponse) XXX_Merge(src proto.Message)
func (*EventResponse) XXX_Size ¶
func (m *EventResponse) XXX_Size() int
func (*EventResponse) XXX_Unmarshal ¶
func (m *EventResponse) XXX_Unmarshal(b []byte) error
type EventStoreClient ¶
type EventStoreClient interface { // Get all events for the given aggregate and event GetEvents(ctx context.Context, in *EventFilter, opts ...grpc.CallOption) (*EventResponse, error) // Create a new event to the event store CreateEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*Response, error) }
EventStoreClient is the client API for EventStore service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEventStoreClient ¶
func NewEventStoreClient(cc *grpc.ClientConn) EventStoreClient
type EventStoreServer ¶
type EventStoreServer interface { // Get all events for the given aggregate and event GetEvents(context.Context, *EventFilter) (*EventResponse, error) // Create a new event to the event store CreateEvent(context.Context, *Event) (*Response, error) }
EventStoreServer is the server API for EventStore service.
type IEventDatabase ¶
type IItemDatabase ¶
type IItemDatabase interface { // ListItems returns a list of items ListItems() ([]*Item, error) // GetItem retrieves a book by its ID. GetItem(id int) (*Item, error) // CreateItem saves a given Item, ID already assigned. CreateItem(b *Item) (id int64, err error) // DeleteItem removes a given Item by its ID. DeleteItem(id int64) error // UpdateItem updates the entry for a given book. UpdateItem(b *Item) error }
type IPriceDatabase ¶
type IPriceDatabase interface { // ListPrices returns a list of Prices ListPrices() ([]*Prices, error) //TODO description GetDistinctPriceHistoryIds() ([]int, error) // AddPrice saves a given Price, ID already assigned. AddPrice(b *Prices) (id int64, err error) //TODO description DropPriceTable() (err error) }
type IdbMysql ¶
type IdbMysql interface { // Close closes the database, freeing up any available resources. Close() error }
type Item ¶
type Item struct { ID uint32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` Icon string `protobuf:"bytes,3,opt,name=Icon,proto3" json:"Icon,omitempty"` Description string `protobuf:"bytes,4,opt,name=Description,proto3" json:"Description,omitempty"` Type string `protobuf:"bytes,5,opt,name=Type,proto3" json:"Type,omitempty"` Rarity string `protobuf:"bytes,6,opt,name=Rarity,proto3" json:"Rarity,omitempty"` Level uint32 `protobuf:"varint,7,opt,name=Level,proto3" json:"Level,omitempty"` VendorValue uint32 `protobuf:"varint,8,opt,name=VendorValue,proto3" json:"VendorValue,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Item) Descriptor ¶
func (*Item) GetDescription ¶
func (*Item) GetVendorValue ¶
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
func (*Item) XXX_DiscardUnknown ¶
func (m *Item) XXX_DiscardUnknown()
func (*Item) XXX_Unmarshal ¶
type ItemBatch ¶
type ItemBatch struct { BatchUUID string `protobuf:"bytes,1,opt,name=batchUUID,proto3" json:"batchUUID,omitempty"` ItemData []byte `protobuf:"bytes,2,opt,name=itemData,proto3" json:"itemData,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ItemBatch) Descriptor ¶
func (*ItemBatch) GetBatchUUID ¶
func (*ItemBatch) GetItemData ¶
func (*ItemBatch) ProtoMessage ¶
func (*ItemBatch) ProtoMessage()
func (*ItemBatch) XXX_DiscardUnknown ¶
func (m *ItemBatch) XXX_DiscardUnknown()
func (*ItemBatch) XXX_Marshal ¶
func (*ItemBatch) XXX_Unmarshal ¶
type ItemIdsRequest ¶
type ItemIdsRequest struct { BatchUUID string `protobuf:"bytes,1,opt,name=batchUUID,proto3" json:"batchUUID,omitempty"` ItemIds []uint32 `protobuf:"varint,2,rep,packed,name=itemIds,proto3" json:"itemIds,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ItemIdsRequest) Descriptor ¶
func (*ItemIdsRequest) Descriptor() ([]byte, []int)
func (*ItemIdsRequest) GetBatchUUID ¶
func (m *ItemIdsRequest) GetBatchUUID() string
func (*ItemIdsRequest) GetItemIds ¶
func (m *ItemIdsRequest) GetItemIds() []uint32
func (*ItemIdsRequest) ProtoMessage ¶
func (*ItemIdsRequest) ProtoMessage()
func (*ItemIdsRequest) Reset ¶
func (m *ItemIdsRequest) Reset()
func (*ItemIdsRequest) String ¶
func (m *ItemIdsRequest) String() string
func (*ItemIdsRequest) XXX_DiscardUnknown ¶
func (m *ItemIdsRequest) XXX_DiscardUnknown()
func (*ItemIdsRequest) XXX_Marshal ¶
func (m *ItemIdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ItemIdsRequest) XXX_Merge ¶
func (m *ItemIdsRequest) XXX_Merge(src proto.Message)
func (*ItemIdsRequest) XXX_Size ¶
func (m *ItemIdsRequest) XXX_Size() int
func (*ItemIdsRequest) XXX_Unmarshal ¶
func (m *ItemIdsRequest) XXX_Unmarshal(b []byte) error
type ItemResponse ¶
type ItemResponse struct { ItemId uint32 `protobuf:"varint,1,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ItemResponse) Descriptor ¶
func (*ItemResponse) Descriptor() ([]byte, []int)
func (*ItemResponse) GetItemId ¶
func (m *ItemResponse) GetItemId() uint32
func (*ItemResponse) ProtoMessage ¶
func (*ItemResponse) ProtoMessage()
func (*ItemResponse) Reset ¶
func (m *ItemResponse) Reset()
func (*ItemResponse) String ¶
func (m *ItemResponse) String() string
func (*ItemResponse) XXX_DiscardUnknown ¶
func (m *ItemResponse) XXX_DiscardUnknown()
func (*ItemResponse) XXX_Marshal ¶
func (m *ItemResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ItemResponse) XXX_Merge ¶
func (m *ItemResponse) XXX_Merge(src proto.Message)
func (*ItemResponse) XXX_Size ¶
func (m *ItemResponse) XXX_Size() int
func (*ItemResponse) XXX_Unmarshal ¶
func (m *ItemResponse) XXX_Unmarshal(b []byte) error
type ItemStoreClient ¶
type ItemStoreClient interface { // Get all events for the given aggregate and event GetItems(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ItemResponse, error) }
ItemStoreClient is the client API for ItemStore service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewItemStoreClient ¶
func NewItemStoreClient(cc *grpc.ClientConn) ItemStoreClient
type ItemStoreServer ¶
type ItemStoreServer interface { // Get all events for the given aggregate and event GetItems(context.Context, *empty.Empty) (*ItemResponse, error) }
ItemStoreServer is the server API for ItemStore service.
type Listings ¶
type Listings struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Buys []*Listings_BUYS `protobuf:"bytes,2,rep,name=buys,proto3" json:"buys,omitempty"` Sells []*Listings_SELLS `protobuf:"bytes,3,rep,name=sells,proto3" json:"sells,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Listings) Descriptor ¶
func (*Listings) GetBuys ¶
func (m *Listings) GetBuys() []*Listings_BUYS
func (*Listings) GetSells ¶
func (m *Listings) GetSells() []*Listings_SELLS
func (*Listings) ProtoMessage ¶
func (*Listings) ProtoMessage()
func (*Listings) XXX_DiscardUnknown ¶
func (m *Listings) XXX_DiscardUnknown()
func (*Listings) XXX_Marshal ¶
func (*Listings) XXX_Unmarshal ¶
type Listings_BUYS ¶
type Listings_BUYS struct { Listings int32 `protobuf:"varint,1,opt,name=listings,proto3" json:"listings,omitempty"` UnitPrice int32 `protobuf:"varint,2,opt,name=unit_price,json=unitPrice,proto3" json:"unit_price,omitempty"` Quantity int32 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Listings_BUYS) Descriptor ¶
func (*Listings_BUYS) Descriptor() ([]byte, []int)
func (*Listings_BUYS) GetListings ¶
func (m *Listings_BUYS) GetListings() int32
func (*Listings_BUYS) GetQuantity ¶
func (m *Listings_BUYS) GetQuantity() int32
func (*Listings_BUYS) GetUnitPrice ¶
func (m *Listings_BUYS) GetUnitPrice() int32
func (*Listings_BUYS) ProtoMessage ¶
func (*Listings_BUYS) ProtoMessage()
func (*Listings_BUYS) Reset ¶
func (m *Listings_BUYS) Reset()
func (*Listings_BUYS) String ¶
func (m *Listings_BUYS) String() string
func (*Listings_BUYS) XXX_DiscardUnknown ¶
func (m *Listings_BUYS) XXX_DiscardUnknown()
func (*Listings_BUYS) XXX_Marshal ¶
func (m *Listings_BUYS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Listings_BUYS) XXX_Merge ¶
func (m *Listings_BUYS) XXX_Merge(src proto.Message)
func (*Listings_BUYS) XXX_Size ¶
func (m *Listings_BUYS) XXX_Size() int
func (*Listings_BUYS) XXX_Unmarshal ¶
func (m *Listings_BUYS) XXX_Unmarshal(b []byte) error
type Listings_SELLS ¶
type Listings_SELLS struct { Listings int32 `protobuf:"varint,1,opt,name=listings,proto3" json:"listings,omitempty"` UnitPrice int32 `protobuf:"varint,2,opt,name=unit_price,json=unitPrice,proto3" json:"unit_price,omitempty"` Quantity int32 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Listings_SELLS) Descriptor ¶
func (*Listings_SELLS) Descriptor() ([]byte, []int)
func (*Listings_SELLS) GetListings ¶
func (m *Listings_SELLS) GetListings() int32
func (*Listings_SELLS) GetQuantity ¶
func (m *Listings_SELLS) GetQuantity() int32
func (*Listings_SELLS) GetUnitPrice ¶
func (m *Listings_SELLS) GetUnitPrice() int32
func (*Listings_SELLS) ProtoMessage ¶
func (*Listings_SELLS) ProtoMessage()
func (*Listings_SELLS) Reset ¶
func (m *Listings_SELLS) Reset()
func (*Listings_SELLS) String ¶
func (m *Listings_SELLS) String() string
func (*Listings_SELLS) XXX_DiscardUnknown ¶
func (m *Listings_SELLS) XXX_DiscardUnknown()
func (*Listings_SELLS) XXX_Marshal ¶
func (m *Listings_SELLS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Listings_SELLS) XXX_Merge ¶
func (m *Listings_SELLS) XXX_Merge(src proto.Message)
func (*Listings_SELLS) XXX_Size ¶
func (m *Listings_SELLS) XXX_Size() int
func (*Listings_SELLS) XXX_Unmarshal ¶
func (m *Listings_SELLS) XXX_Unmarshal(b []byte) error
type MySQLConfig ¶
type MySQLConfig struct {
// Optional.
Username, Password string
// Host of the MySQL instance.
//
// If set, UnixSocket should be unset.
Host string
// Port of the MySQL instance.
//
// If set, UnixSocket should be unset.
Port int
// UnixSocket is the file path to a unix socket.
//
// If set, Host and Port should be unset.
UnixSocket string
}
func (MySQLConfig) NewMySQLDB ¶
func (mysqlConfig MySQLConfig) NewMySQLDB() (*MySQLConn, error)
newMySQLDB creates a new MySQLConn backed by a given MySQL server.
type MySQLConn ¶
type MySQLConn struct { Conn *sql.DB MaxAllowedPacket *sql.Stmt Item *itemDatabase Price *priceDatabase Event *eventDatabase }
func (*MySQLConn) BulkCreateItem ¶
func (*MySQLConn) Close ¶
Close closes the database, freeing up any resources. Before closing it finishing flushing any existing batch inserts.
func (*MySQLConn) PrepareEventStatements ¶
func (*MySQLConn) PrepareItemStatements ¶
func (*MySQLConn) PreparePriceStatements ¶
type Prices ¶
type Prices struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Whitelisted bool `protobuf:"varint,2,opt,name=whitelisted,proto3" json:"whitelisted,omitempty"` FetchDatetime int64 `protobuf:"varint,3,opt,name=fetch_datetime,json=fetchDatetime,proto3" json:"fetch_datetime,omitempty"` Buys *Prices_BUYS `protobuf:"bytes,4,opt,name=buys,proto3" json:"buys,omitempty"` Sells *Prices_SELLS `protobuf:"bytes,5,opt,name=sells,proto3" json:"sells,omitempty"` AggregateId string `protobuf:"bytes,6,opt,name=aggregate_id,json=aggregateId,proto3" json:"aggregate_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ArticlePrice Listings for a specific item (highest buy, lowest sell)
func (*Prices) Descriptor ¶
func (*Prices) GetAggregateId ¶
func (*Prices) GetBuys ¶
func (m *Prices) GetBuys() *Prices_BUYS
func (*Prices) GetFetchDatetime ¶
func (*Prices) GetSells ¶
func (m *Prices) GetSells() *Prices_SELLS
func (*Prices) GetWhitelisted ¶
func (*Prices) ProtoMessage ¶
func (*Prices) ProtoMessage()
func (*Prices) XXX_DiscardUnknown ¶
func (m *Prices) XXX_DiscardUnknown()
func (*Prices) XXX_Marshal ¶
func (*Prices) XXX_Unmarshal ¶
type PricesRequest ¶
type PricesRequest struct { Page uint32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` PageSize uint32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PricesRequest) Descriptor ¶
func (*PricesRequest) Descriptor() ([]byte, []int)
func (*PricesRequest) GetPage ¶
func (m *PricesRequest) GetPage() uint32
func (*PricesRequest) GetPageSize ¶
func (m *PricesRequest) GetPageSize() uint32
func (*PricesRequest) ProtoMessage ¶
func (*PricesRequest) ProtoMessage()
func (*PricesRequest) Reset ¶
func (m *PricesRequest) Reset()
func (*PricesRequest) String ¶
func (m *PricesRequest) String() string
func (*PricesRequest) XXX_DiscardUnknown ¶
func (m *PricesRequest) XXX_DiscardUnknown()
func (*PricesRequest) XXX_Marshal ¶
func (m *PricesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PricesRequest) XXX_Merge ¶
func (m *PricesRequest) XXX_Merge(src proto.Message)
func (*PricesRequest) XXX_Size ¶
func (m *PricesRequest) XXX_Size() int
func (*PricesRequest) XXX_Unmarshal ¶
func (m *PricesRequest) XXX_Unmarshal(b []byte) error
type Prices_BUYS ¶
type Prices_BUYS struct { Quantity uint32 `protobuf:"varint,1,opt,name=quantity,proto3" json:"quantity,omitempty"` UnitPrice uint32 `protobuf:"varint,2,opt,name=unit_price,json=unitPrice,proto3" json:"unit_price,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Price includes quantity and the high/low price
func (*Prices_BUYS) Descriptor ¶
func (*Prices_BUYS) Descriptor() ([]byte, []int)
func (*Prices_BUYS) GetQuantity ¶
func (m *Prices_BUYS) GetQuantity() uint32
func (*Prices_BUYS) GetUnitPrice ¶
func (m *Prices_BUYS) GetUnitPrice() uint32
func (*Prices_BUYS) ProtoMessage ¶
func (*Prices_BUYS) ProtoMessage()
func (*Prices_BUYS) Reset ¶
func (m *Prices_BUYS) Reset()
func (*Prices_BUYS) String ¶
func (m *Prices_BUYS) String() string
func (*Prices_BUYS) XXX_DiscardUnknown ¶
func (m *Prices_BUYS) XXX_DiscardUnknown()
func (*Prices_BUYS) XXX_Marshal ¶
func (m *Prices_BUYS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Prices_BUYS) XXX_Merge ¶
func (m *Prices_BUYS) XXX_Merge(src proto.Message)
func (*Prices_BUYS) XXX_Size ¶
func (m *Prices_BUYS) XXX_Size() int
func (*Prices_BUYS) XXX_Unmarshal ¶
func (m *Prices_BUYS) XXX_Unmarshal(b []byte) error
type Prices_SELLS ¶
type Prices_SELLS struct { Quantity uint32 `protobuf:"varint,1,opt,name=quantity,proto3" json:"quantity,omitempty"` UnitPrice uint32 `protobuf:"varint,2,opt,name=unit_price,json=unitPrice,proto3" json:"unit_price,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Price includes quantity and the high/low price
func (*Prices_SELLS) Descriptor ¶
func (*Prices_SELLS) Descriptor() ([]byte, []int)
func (*Prices_SELLS) GetQuantity ¶
func (m *Prices_SELLS) GetQuantity() uint32
func (*Prices_SELLS) GetUnitPrice ¶
func (m *Prices_SELLS) GetUnitPrice() uint32
func (*Prices_SELLS) ProtoMessage ¶
func (*Prices_SELLS) ProtoMessage()
func (*Prices_SELLS) Reset ¶
func (m *Prices_SELLS) Reset()
func (*Prices_SELLS) String ¶
func (m *Prices_SELLS) String() string
func (*Prices_SELLS) XXX_DiscardUnknown ¶
func (m *Prices_SELLS) XXX_DiscardUnknown()
func (*Prices_SELLS) XXX_Marshal ¶
func (m *Prices_SELLS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Prices_SELLS) XXX_Merge ¶
func (m *Prices_SELLS) XXX_Merge(src proto.Message)
func (*Prices_SELLS) XXX_Size ¶
func (m *Prices_SELLS) XXX_Size() int
func (*Prices_SELLS) XXX_Unmarshal ¶
func (m *Prices_SELLS) XXX_Unmarshal(b []byte) error
type Response ¶
type Response struct { IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Response) Descriptor ¶
func (*Response) GetIsSuccess ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
type UnimplementedEventStoreServer ¶
type UnimplementedEventStoreServer struct { }
UnimplementedEventStoreServer can be embedded to have forward compatible implementations.
func (*UnimplementedEventStoreServer) CreateEvent ¶
func (*UnimplementedEventStoreServer) GetEvents ¶
func (*UnimplementedEventStoreServer) GetEvents(ctx context.Context, req *EventFilter) (*EventResponse, error)
type UnimplementedItemStoreServer ¶
type UnimplementedItemStoreServer struct { }
UnimplementedItemStoreServer can be embedded to have forward compatible implementations.
func (*UnimplementedItemStoreServer) GetItems ¶
func (*UnimplementedItemStoreServer) GetItems(ctx context.Context, req *empty.Empty) (*ItemResponse, error)