go.bigb.es/curator

v1.0.1
Doc Versions Source

Functions

f func AuthMiddleware

src
func AuthMiddleware(adminToken string, next http.Handler) http.Handler

AuthMiddleware protects admin routes with the admin token. Supports Bearer token in Authorization header and cookie-based sessions.

Types

T type APIHandler

src
type APIHandler struct {
	// contains filtered or unexported fields
}

APIHandler serves the REST API for module management.

f func NewAPI

src

NewAPI creates a new API handler.

m func (*APIHandler) ServeHTTP

src
func (h *APIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP routes API requests.

T type Handler

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

Handler serves the admin UI.

f func New

src
func New(st *store.Store) (*Handler, error)

New creates a new admin handler.

m func (*Handler) ServeHTTP

src
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP routes admin requests.

Source Files