apihandler

package
v1.18.4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	logger *slog.Logger,
	versionSvc *app.VersionService,
	serverSvc *app.ServerService,
	tribeSvc *app.TribeService,
	playerSvc *app.PlayerService,
	villageSvc *app.VillageService,
	ennoblementSvc *app.EnnoblementService,
	tribeChangeSvc *app.TribeChangeService,
	serverSnapshotSvc *app.ServerSnapshotService,
	tribeSnapshotSvc *app.TribeSnapshotService,
	playerSnapshotSvc *app.PlayerSnapshotService,
	opts ...Option,
) http.Handler

Types

type OpenAPIConfig

type OpenAPIConfig struct {
	Enabled        bool
	SwaggerEnabled bool
	BasePath       string
	Servers        []OpenAPIConfigServer
}

type OpenAPIConfigServer

type OpenAPIConfigServer struct {
	URL *url.URL
}

type Option

type Option func(cfg *config)

func WithMetricsPrefix added in v1.17.1

func WithMetricsPrefix(prefix string) Option

func WithMetricsRegisterer added in v1.17.1

func WithMetricsRegisterer(reg prometheus.Registerer) Option

func WithOpenAPIConfig

func WithOpenAPIConfig(oapiCfg OpenAPIConfig) Option

func WithRealClientIPStrategy added in v1.17.1

func WithRealClientIPStrategy(strategy realclientip.Strategy) Option

func WithTimeout

func WithTimeout(timeout time.Duration) Option

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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