server

package
v0.0.0-...-0622fba Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTemplate

func NewTemplate(path string) *template.Template

func ParseIP

func ParseIP(r *http.Request) string

func RandomID

func RandomID() string

Types

type Server

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

func New

func New(pathDB string) *Server

func (*Server) ErrorCode

func (s *Server) ErrorCode(w http.ResponseWriter, code int)

func (*Server) ErrorMessage

func (s *Server) ErrorMessage(w http.ResponseWriter, msg string)

func (*Server) Start

func (s *Server) Start(addr string) error

func (*Server) Template

func (s *Server) Template(tmpl *template.Template, w http.ResponseWriter, data any)

Jump to

Keyboard shortcuts

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