web

package
v0.0.0-...-a0c8092 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CatalogueGroup

type CatalogueGroup struct {
	ID    int64
	Name  string
	Works []domain.Work
}

CatalogueGroup represents a group of works (by author or series).

type CoverSearchResult

type CoverSearchResult struct {
	Source   string `json:"source"`
	Title    string `json:"title"`
	Author   string `json:"author"`
	ISBN     string `json:"isbn"`
	Year     int    `json:"year,omitempty"`
	CoverURL string `json:"cover_url"`
	ThumbURL string `json:"thumb_url"`
}

CoverSearchResult represents a single cover art candidate.

type MetadataResult

type MetadataResult struct {
	Title       string   `json:"title"`
	Authors     []string `json:"authors"`
	Year        int      `json:"first_publish_year"`
	ISBN        []string `json:"isbn"`
	Publishers  []string `json:"publishers"`
	Languages   []string `json:"languages"`
	Subjects    []string `json:"subjects"`
	Pages       int      `json:"pages"`
	CoverID     int      `json:"cover_id"`
	Description string   `json:"description"`
}

MetadataResult represents a search result from Open Library.

type Server

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

Server is the main HTTP server.

func NewServer

func NewServer(s store.Store, cfg *config.Config) (*Server, error)

NewServer creates a new web server.

func (*Server) Run

func (s *Server) Run() error

Run starts the HTTP server with graceful shutdown.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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