handler

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLimit = 50
	MaxLimit     = 100
)

ModServiceInterface defines the interface for mod service operations

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(modService ModServiceInterface, version string, disabledVersions []string) *Handler

func (*Handler) RegisterRoutes

func (h *Handler) RegisterRoutes(mux *http.ServeMux, basePath string)

type ModServiceInterface

type ModServiceInterface interface {
	GetModList(ctx context.Context, limit int, after string, before string) ([]modmgr.Mod, error)
	GetMod(ctx context.Context, modID string) (*modmgr.Mod, error)
	GetModVersions(ctx context.Context, modID string, limit int, after string) ([]modmgr.ModVersion, error)
	GetModVersion(ctx context.Context, modID string, versionID string) (*modmgr.ModVersion, error)
}

Jump to

Keyboard shortcuts

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