skweb

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Overview

Package skweb provides a web interface to a sako (API) server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	ID          int64
	URL         template.URL
	OriginURL   template.URL
	Title       template.HTML
	Domain      template.HTML
	Thumb       template.URL
	ReadingTime template.HTML
	CreatedAt   template.HTML
	Archived    bool
	Starred     bool

	Tags []sako.Tag

	Content template.HTML
}
type Links struct {
	First template.URL
	Prev  template.URL
	Self  template.URL
	Next  template.URL
	Last  template.URL
}

type Page

type Page struct {
	CSRF       template.HTML
	User       template.HTML
	Title      template.HTML
	Links      Links
	NumEntries int64
	Entries    []Entry
}

type Server

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

func NewServer

func NewServer(repo skdb.Repository) (*Server, error)

func (*Server) Close

func (srv *Server) Close() error

func (*Server) ServeHTTP

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

Jump to

Keyboard shortcuts

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