handler

package
v0.0.0-...-7b178d5 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORSMiddleware

func CORSMiddleware() *cors.Cors

func HandleChangelog

func HandleChangelog(w http.ResponseWriter, r *http.Request)

func HandleContents

func HandleContents(w http.ResponseWriter, r *http.Request)

func HandleHome

func HandleHome(w http.ResponseWriter, r *http.Request)

func HandleInternalError

func HandleInternalError(w http.ResponseWriter, r *http.Request)

func HandleList

func HandleList(w http.ResponseWriter, r *http.Request)

func HandleNotFound

func HandleNotFound(w http.ResponseWriter, r *http.Request)

func HandleReadme

func HandleReadme(w http.ResponseWriter, r *http.Request)

func HandleRepopack

func HandleRepopack(w http.ResponseWriter, r *http.Request)

func HandleSkills

func HandleSkills(w http.ResponseWriter, r *http.Request)

func HandleUnprocessable

func HandleUnprocessable(w http.ResponseWriter, r *http.Request)

func InitAssets

func InitAssets(staticDir string) error

func InitTemplates

func InitTemplates(templateDir string) error

func RedirectDocs

func RedirectDocs(w http.ResponseWriter, r *http.Request)

func SecurityHeaders

func SecurityHeaders(next http.Handler) http.Handler

Types

type DocsHandler

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

func NewDocsHandler

func NewDocsHandler(openapiDir string) *DocsHandler

func (*DocsHandler) HandleDocs

func (d *DocsHandler) HandleDocs(w http.ResponseWriter, r *http.Request)

func (*DocsHandler) HandleOpenAPISpec

func (d *DocsHandler) HandleOpenAPISpec(w http.ResponseWriter, r *http.Request)

type ErrorData

type ErrorData struct {
	AppName         string
	AppDescription  string
	MetaTitle       string
	MetaDescription string
	GithubRepoName  string
	Services        map[string][]Service
	RequestBaseURL  string
	StatusCode      int
	StatusText      string
}

type Format

type Format struct {
	Name       string
	Ecosystems []string
}

type HomeData

type HomeData struct {
	Formats         []Format
	AppName         string
	AppDescription  string
	MetaTitle       string
	MetaDescription string
	GithubRepoName  string
	Services        map[string][]Service
	RequestBaseURL  string
}

type Service

type Service struct {
	Name string
	URL  string
}

Jump to

Keyboard shortcuts

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