handler

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostModifier added in v0.3.2

func HostModifier(req *http.Request)

func QueryModifier added in v0.3.2

func QueryModifier(req *http.Request)

Types

type Handler

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

func NewHandler

func NewHandler(repository repository, servers map[string]provider.Provider, provider provider.Provider) *Handler

func (*Handler) HandleDynamicForward

func (h *Handler) HandleDynamicForward(c echo.Context) error

HandleDynamicForward Handle requests that are forwarded on a per-player basis. Dynamic meaning that two requests from a single server for two different players may be forwarded to different providers.

func (*Handler) HandleGetPlayer added in v0.2.0

func (h *Handler) HandleGetPlayer(c echo.Context) error

func (*Handler) HandleGetVerifyPlayer added in v0.3.0

func (h *Handler) HandleGetVerifyPlayer(c echo.Context) error

func (*Handler) HandleStaticForward

func (h *Handler) HandleStaticForward(c echo.Context) error

HandleStaticForward Handle requests that are forwarded on a per-server basis. Static only in the sense that any request from a given server will be forwarded to the same provider.

type Modifier added in v0.3.2

type Modifier func(req *http.Request)

Modifier Modifies the outgoing request in place

type PlayerDTO added in v0.2.0

type PlayerDTO struct {
	PID        int     `json:"pid"`
	Nick       string  `json:"nick"`
	Provider   string  `json:"provider"`
	ProfileURL *string `json:"profileUrl"`
}

func EncodePlayer added in v0.2.0

func EncodePlayer(p player.Player) PlayerDTO

type UpstreamResponse

type UpstreamResponse struct {
	StatusCode int
	Header     map[string][]string
	Body       []byte
}

Jump to

Keyboard shortcuts

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