Documentation ¶
Index ¶
- type Cost
- func (c *Cost) AddUnitCost(ctx context.Context, ar *cost.UpdateRequest) (*cost.UpdateResponse, error)
- func (c *Cost) GetUnitCost(ctx context.Context, cr *cost.CostRequest) (*cost.CostResponse, error)
- func (c *Cost) TotalBasket(ctx context.Context, bask *cost.Basket) (*cost.CostResponse, error)
- func (c *Cost) UpdateUnitCost(ctx context.Context, ar *cost.UpdateRequest) (*cost.UpdateResponse, error)
- type Inventory
- func (i *Inventory) ChangeStock(ctx context.Context, cr *inv.AmendRequest) (*inv.AmendResponse, error)
- func (i *Inventory) CheckShort(ctx context.Context, sr *inv.ShortRequest) (*inv.ShortList, error)
- func (i *Inventory) GetStock(ctx context.Context, lr *inv.LevelRequest) (*inv.StockItem, error)
- func (i *Inventory) GetStore(ctx context.Context, sr *inv.ShortRequest) (*inv.ShortList, error)
- type Order
- type User
- func (u *User) GetAccess(ctx context.Context, ur *user.IDUserRequest) (*user.AccessResponse, error)
- func (u *User) GetUserByID(ctx context.Context, ur *user.IDUserRequest) (*user.UserResponse, error)
- func (u *User) GetUserByUN(ctx context.Context, ur *user.UNUserRequest) (*user.UserResponse, error)
- func (u *User) Login(ctx context.Context, ur *user.AuthsRequest) (*user.AccessResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cost ¶
type Cost struct {
// contains filtered or unexported fields
}
Cost Base inventory server struct, has a logger and a path
func (*Cost) AddUnitCost ¶
func (c *Cost) AddUnitCost(ctx context.Context, ar *cost.UpdateRequest) (*cost.UpdateResponse, error)
AddUnitCost Updates a Unit Cost
func (*Cost) GetUnitCost ¶
func (c *Cost) GetUnitCost(ctx context.Context, cr *cost.CostRequest) (*cost.CostResponse, error)
GetUnitCost Gets the unit cost based on the id
func (*Cost) TotalBasket ¶
TotalBasket Gets the total cost of a basket
func (*Cost) UpdateUnitCost ¶
func (c *Cost) UpdateUnitCost(ctx context.Context, ar *cost.UpdateRequest) (*cost.UpdateResponse, error)
UpdateUnitCost Updates a Unit Cost
type Inventory ¶
type Inventory struct {
// contains filtered or unexported fields
}
Inventory Base inventory server struct, has a logger and a path
func NewInventory ¶
NewInventory Initialiser, takes the arguments and returns a new inventory server with the arguments passed in
func (*Inventory) ChangeStock ¶
func (i *Inventory) ChangeStock(ctx context.Context, cr *inv.AmendRequest) (*inv.AmendResponse, error)
ChangeStock Changes the amount of stock and adds stock if not present
func (*Inventory) CheckShort ¶
CheckShort Gets a list of all stocks that are short of items TODO Add a field to stock item saying when to replace items ie replace toilet rolls if stock < 100 but replace toothpaste when stock < 20
type Order ¶
type Order struct {
// contains filtered or unexported fields
}
Order in the room
func (*Order) AddToBasket ¶
AddToBasket da
func (*Order) MakeOrder ¶
func (o *Order) MakeOrder(ctx context.Context, or *order.OrderRequest) (*order.OrderResponse, error)
MakeOrder makes an order
type User ¶
type User struct {
// contains filtered or unexported fields
}
User something
func (*User) GetAccess ¶
func (u *User) GetAccess(ctx context.Context, ur *user.IDUserRequest) (*user.AccessResponse, error)
GetAccess DEPRECATED METHOD DUE TO COOKIES WITH HARD CODED VALUE
func (*User) GetUserByID ¶
func (u *User) GetUserByID(ctx context.Context, ur *user.IDUserRequest) (*user.UserResponse, error)
GetUserByID DEPRECATED METHOD
func (*User) GetUserByUN ¶
func (u *User) GetUserByUN(ctx context.Context, ur *user.UNUserRequest) (*user.UserResponse, error)
GetUserByUN blahblablah
func (*User) Login ¶
func (u *User) Login(ctx context.Context, ur *user.AuthsRequest) (*user.AccessResponse, error)
Login blahblablah