apihandler

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 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,
	reg prometheus.Registerer,
	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 WithOpenAPIConfig

func WithOpenAPIConfig(oapiCfg OpenAPIConfig) Option

func WithTimeout

func WithTimeout(timeout time.Duration) Option

Jump to

Keyboard shortcuts

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