Documentation ¶
Index ¶
- Variables
- func AucBotContext(r *http.Request) *model.AucBotContext
- func NewBotHTTPRouter(apiConfig model.APIConfig, patch model.RecipeVersion, accessors *Accessors, ...) http.Handler
- func NewChiRouter(apiConfig model.APIConfig, patch model.RecipeVersion, accessors *Accessors, ...) *chi.Mux
- type Accessors
- type AucbotMiddleware
- func (m *AucbotMiddleware) AucBotContext(generateCID bool, patch model.RecipeVersion) func(next http.Handler) http.Handler
- func (m *AucbotMiddleware) BasicAuth(tokens model.HTTPAuth) func(next http.Handler) http.Handler
- func (m *AucbotMiddleware) Realm(bnet *bnet.Accessor) func(next http.Handler) http.Handler
- func (m *AucbotMiddleware) RequiredQueryParams(requiredParams ...string) func(next http.Handler) http.Handler
- func (m *AucbotMiddleware) Session() func(next http.Handler) http.Handler
- type Session
- func (a Session) AccessTypeTag() model.AccessTypeTag
- func (a Session) ChannelID() string
- func (a Session) ChannelSessionID() string
- func (a Session) Context() *model.AucBotContext
- func (a Session) MessageID() string
- func (a Session) SetToken(token string)
- func (a Session) Token() string
- func (a Session) UserSessionID() string
- func (a Session) Username() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRankNonNumeric = errors.New("must be a number") ErrRankInvalid = errors.New("must be a positive number") )
Functions ¶
func AucBotContext ¶
func AucBotContext(r *http.Request) *model.AucBotContext
func NewBotHTTPRouter ¶
func NewBotHTTPRouter(apiConfig model.APIConfig, patch model.RecipeVersion, accessors *Accessors, abh *handlers.AucBot) http.Handler
NewBotHTTPRouter creates an instrumented router for serving http requests
func NewChiRouter ¶
Types ¶
type Accessors ¶
type Accessors struct { DbAccessor *db.Accessor BnetAccessor *bnet.Accessor EnableValuationFunctions bool }
Accessors holds data sources shared by all API routes
type AucbotMiddleware ¶
func (*AucbotMiddleware) AucBotContext ¶
func (m *AucbotMiddleware) AucBotContext(generateCID bool, patch model.RecipeVersion) func(next http.Handler) http.Handler
AucBotContext adds the context object and requestID
func (*AucbotMiddleware) RequiredQueryParams ¶
func (m *AucbotMiddleware) RequiredQueryParams(requiredParams ...string) func(next http.Handler) http.Handler
RequiredQueryParams denies requests that do not include the given query params
type Session ¶
type Session struct { AucBotContext *model.AucBotContext RequestID string RealmSlug string Region string }
Session is an API layer implementation of Session
func (Session) AccessTypeTag ¶
func (a Session) AccessTypeTag() model.AccessTypeTag
func (Session) ChannelSessionID ¶
func (Session) Context ¶
func (a Session) Context() *model.AucBotContext
func (Session) UserSessionID ¶
Click to show internal directories.
Click to hide internal directories.