http

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host             string
	Port             string
	ReadTimeout      time.Duration
	WriteTimeout     time.Duration
	MaxHeaderSize    int
	MaxBodysizeBytes int

	GeneratedBaseURL string
}

func (*Config) Sanitize

func (c *Config) Sanitize()

type Handler

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

Handler has all the dependencies initialized and stored, and made available to all the handler methods

func (*Handler) CreatePage

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

func (*Handler) Home

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

func (*Handler) MetaStatic added in v0.2.6

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

func (*Handler) SSEHandler added in v0.4.1

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

func (*Handler) Static added in v0.2.1

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

func (*Handler) ViewPage

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

type PageResponse

type PageResponse struct {
	pages.Page
	BaseURL string
	Link    string
	Message string
}

type Server

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

func New

func New(cfg *Config, api *api.API) (*Server, error)

func (*Server) Start

func (h *Server) Start() error

Jump to

Keyboard shortcuts

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