handler

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PathChat      = "/v1/chat/completions"
	PathMessages  = "/v1/messages"
	PathResponses = "/v1/responses"
)

Upstream API paths. BuildUpstreamURL handles /v1 deduplication so base_url can be configured with or without /v1.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminHandler

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

func NewAdminHandler

func NewAdminHandler(provider *config.Provider) *AdminHandler

func (*AdminHandler) RegisterRoutes

func (a *AdminHandler) RegisterRoutes(r *gin.RouterGroup)

type Handler

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

func NewHandler

func NewHandler(provider *config.Provider, usageStore *store.UsageStore, r router.Router) *Handler

func (*Handler) RegisterRoutes

func (h *Handler) RegisterRoutes(r *gin.Engine)

RegisterRoutes registers all API endpoints.

Jump to

Keyboard shortcuts

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