Documentation ¶
Index ¶
- func CheckAuth(ctx context.Context, authServiceURL string) bool
- type AuthenticationMiddleware
- func (a *AuthenticationMiddleware) Create(ctx context.Context, data database.OrderIn) (string, error)
- func (a *AuthenticationMiddleware) Delete(ctx context.Context, id uint) (string, error)
- func (a *AuthenticationMiddleware) GetByID(ctx context.Context, id uint) ([]database.OrderItemOut, error)
- func (a *AuthenticationMiddleware) QuantityOrdered(ctx context.Context, id uint) (uint, error)
- func (a *AuthenticationMiddleware) Search(ctx context.Context, search string, startDate time.Time, endDate time.Time) ([]database.OrderOut, error)
- func (a *AuthenticationMiddleware) Top(ctx context.Context, count uint) ([]database.ProductOutTop, error)
- func (a *AuthenticationMiddleware) Total(ctx context.Context) (float32, error)
- type InstrumentingMiddleware
- func (i *InstrumentingMiddleware) Create(ctx context.Context, data database.OrderIn) (msg string, err error)
- func (i *InstrumentingMiddleware) Delete(ctx context.Context, id uint) (msg string, err error)
- func (i *InstrumentingMiddleware) GetByID(ctx context.Context, id uint) (order []database.OrderItemOut, err error)
- func (i *InstrumentingMiddleware) QuantityOrdered(ctx context.Context, id uint) (qty uint, err error)
- func (i *InstrumentingMiddleware) Search(ctx context.Context, search string, startDate time.Time, endDate time.Time) (orders []database.OrderOut, err error)
- func (i *InstrumentingMiddleware) Top(ctx context.Context, count uint) (top []database.ProductOutTop, err error)
- func (i *InstrumentingMiddleware) Total(ctx context.Context) (total float32, err error)
- type LoggingMiddleware
- func (l *LoggingMiddleware) Create(ctx context.Context, data database.OrderIn) (msg string, err error)
- func (l *LoggingMiddleware) Delete(ctx context.Context, id uint) (msg string, err error)
- func (l *LoggingMiddleware) GetByID(ctx context.Context, id uint) (order []database.OrderItemOut, err error)
- func (l *LoggingMiddleware) QuantityOrdered(ctx context.Context, id uint) (qty uint, err error)
- func (l *LoggingMiddleware) Search(ctx context.Context, search string, startDate time.Time, endDate time.Time) (orders []database.OrderOut, err error)
- func (l *LoggingMiddleware) Top(ctx context.Context, count uint) (products []database.ProductOutTop, err error)
- func (l *LoggingMiddleware) Total(ctx context.Context) (total float32, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthenticationMiddleware ¶
func (*AuthenticationMiddleware) GetByID ¶
func (a *AuthenticationMiddleware) GetByID(ctx context.Context, id uint) ([]database.OrderItemOut, error)
func (*AuthenticationMiddleware) QuantityOrdered ¶
func (*AuthenticationMiddleware) Top ¶
func (a *AuthenticationMiddleware) Top(ctx context.Context, count uint) ([]database.ProductOutTop, error)
type InstrumentingMiddleware ¶
type InstrumentingMiddleware struct { RequestCount metrics.Counter RequestLatency metrics.Histogram Next service.Service }
func (*InstrumentingMiddleware) GetByID ¶
func (i *InstrumentingMiddleware) GetByID(ctx context.Context, id uint) (order []database.OrderItemOut, err error)
func (*InstrumentingMiddleware) QuantityOrdered ¶
func (*InstrumentingMiddleware) Top ¶
func (i *InstrumentingMiddleware) Top(ctx context.Context, count uint) (top []database.ProductOutTop, err error)
type LoggingMiddleware ¶
func (*LoggingMiddleware) GetByID ¶
func (l *LoggingMiddleware) GetByID(ctx context.Context, id uint) (order []database.OrderItemOut, err error)
func (*LoggingMiddleware) QuantityOrdered ¶
func (*LoggingMiddleware) Top ¶
func (l *LoggingMiddleware) Top(ctx context.Context, count uint) (products []database.ProductOutTop, err error)
Click to show internal directories.
Click to hide internal directories.