Documentation ¶
Index ¶
- func CheckAuth(ctx context.Context, authServiceURL string) bool
- type AuthenticationMiddleware
- func (a *AuthenticationMiddleware) Create(ctx context.Context, data database.ProductIn) (string, error)
- func (a *AuthenticationMiddleware) Delete(ctx context.Context, id uint) (string, error)
- func (a *AuthenticationMiddleware) GetByID(ctx context.Context, id uint) (database.ProductOut, error)
- func (a *AuthenticationMiddleware) Search(ctx context.Context, search string, category uint, minPrice float32, ...) ([]database.ProductOut, error)
- func (a *AuthenticationMiddleware) Update(ctx context.Context, id uint, data database.ProductIn) (string, error)
- type InstrumentingMiddleware
- func (i *InstrumentingMiddleware) Create(ctx context.Context, data database.ProductIn) (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) (product database.ProductOut, err error)
- func (i *InstrumentingMiddleware) Search(ctx context.Context, search string, category uint, minPrice float32, ...) (products []database.ProductOut, err error)
- func (i *InstrumentingMiddleware) Update(ctx context.Context, id uint, data database.ProductIn) (msg string, err error)
- type LoggingMiddleware
- func (l *LoggingMiddleware) Create(ctx context.Context, data database.ProductIn) (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) (product database.ProductOut, err error)
- func (l *LoggingMiddleware) Search(ctx context.Context, search string, category uint, minPrice float32, ...) (products []database.ProductOut, err error)
- func (l *LoggingMiddleware) Update(ctx context.Context, id uint, data database.ProductIn) (msg string, 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.ProductOut, 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) (product database.ProductOut, err error)
Click to show internal directories.
Click to hide internal directories.