Documentation ¶
Index ¶
- func JSONFrom(key string) func(ctx *fiber.Ctx) error
- func WithBattle(r battles.Reader) func(*fiber.Ctx) error
- func WithBattles(r battles.Reader) func(*fiber.Ctx) error
- func WithCommander(r commanders.Reader) func(*fiber.Ctx) error
- func WithCommanders(r commanders.Reader) func(*fiber.Ctx) error
- func WithFaction(r factions.Reader) func(*fiber.Ctx) error
- func WithFactions(r factions.Reader) func(*fiber.Ctx) error
- func WithPage() func(*fiber.Ctx) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithBattle ¶
WithBattle middleware sets the battle corresponding to the :battleID URL parameter into ctx.Locals under the key "battle"
func WithBattles ¶
WithBattles middleware finds battles according to the optional :factionID or :commanderID URL parameters and the optional "page" query parameter (falling back to 1), and sets them into ctx.Locals under the key "battles". When present, it will also use the "name", "summary", "place" and "result" query parameters to refine this search
func WithCommander ¶
func WithCommander(r commanders.Reader) func(*fiber.Ctx) error
WithCommander middleware sets the commander corresponding to the :commanderID URL parameter into ctx.Locals under the key "commander"
func WithCommanders ¶
func WithCommanders(r commanders.Reader) func(*fiber.Ctx) error
WithCommanders middleware finds commanders according to the optional :factionID URL parameter and the optional "page" query parameter (falling back to 1), and sets them into ctx.Locals under the key "commanders". When present, it will also use the "name" and "summary" query parameters to refine this search
func WithFaction ¶
WithFaction middleware sets the faction corresponding to the :factionID URL parameter into ctx.Locals under the key "faction"
func WithFactions ¶
WithFactions middleware finds factions according to the optional :commanderID URL parameter and the optional "page" query parameter (falling back to 1), and sets them into ctx.Locals under the key "factions". When present, it will also use the "name" and "summary" query parameters to refine this search
Types ¶
This section is empty.