brand

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CodeTypeMissingBrand indicates that brand header is no present on the request
	CodeTypeMissingBrand errors.CodeType = "MISSING_BRAND"
)
View Source
const ContextKeyBrandID string = "brand_id"

ContextKeyBrandID is the key used to retrieve and save brand into the context

Variables

This section is empty.

Functions

This section is empty.

Types

type BrandFiller

type BrandFiller struct {
	// contains filtered or unexported fields
}

BrandFiller structure responsible for injecting the brand into HTTP request context.

func MustNewBrandFiller

func MustNewBrandFiller(logger infra.Logger) BrandFiller

MustNewBrandFiller creates a new instance of the Brand structure. It panics if any error is found.

func NewBrandFiller

func NewBrandFiller(logger infra.Logger) (BrandFiller, error)

NewBrandFiller creates a new instance of the Brand structure

func (BrandFiller) Fill

func (ua BrandFiller) Fill(ctx *routing.Context) error

Fill is the middleware responsible for retrieving brand id from the headers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL