Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerService ¶
type ConsumerService struct {
// contains filtered or unexported fields
}
func NewConsumerService ¶
func NewConsumerService(repo data.CoffeeRepository, nc Subscriber, logger log.Logger) *ConsumerService
func (ConsumerService) GetCoffees ¶
func (c ConsumerService) GetCoffees(msg Message)
func (ConsumerService) RegisterConsumer ¶
func (c ConsumerService) RegisterConsumer(topic string, consumer Consumer)
type Outbox ¶
type Outbox struct {
// contains filtered or unexported fields
}
func (*Outbox) StartBackgroundPolling ¶
type ProductService ¶
type ProductService struct {
// contains filtered or unexported fields
}
ProductService defines the operations the service supports
func NewCoffeeService ¶
func NewCoffeeService(repo data.CoffeeRepository, outbox *Outbox, logger log.Logger) *ProductService
NewCoffeeService creates a new instance of the coffee service
func (*ProductService) Add ¶
func (p *ProductService) Add(w http.ResponseWriter, r *http.Request)
Add adds a new coffee from the json body
func (*ProductService) Get ¶
func (p *ProductService) Get(w http.ResponseWriter, r *http.Request)
Get retrieves a coffee by id
func (*ProductService) List ¶
func (p *ProductService) List(w http.ResponseWriter, r *http.Request)
List retrieves a list of coffees
func (*ProductService) RegisterRoutes ¶
func (p *ProductService) RegisterRoutes(r *mux.Router)
type Subscriber ¶
Click to show internal directories.
Click to hide internal directories.