http

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR_PAGE = "<html><head><title>%s</title></head><body><center><h1>%d %s</h1></center><hr><center>" + cnst.SIGN + "</center></body></html>\n"
)

Variables

This section is empty.

Functions

func Filename

func Filename(r *http.Request) (fn string)

*

  • Return slash-trimmed filename

Types

type Server

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

func RunServer

func RunServer(s *storage.Storage, accessLog *aelog.AntLog) (server *Server)

Create new server and run it

func (*Server) Command

func (s *Server) Command(name string, w http.ResponseWriter, r *http.Request)

func (*Server) Delete

func (s *Server) Delete(name string, w http.ResponseWriter, r *http.Request)

func (*Server) Download

func (s *Server) Download(name string, w http.ResponseWriter, r *http.Request)

func (*Server) Err

func (s *Server) Err(code int, r *http.Request, w http.ResponseWriter)

func (*Server) Get

func (s *Server) Get(name string, w http.ResponseWriter, r *http.Request, writeBody bool)

func (*Server) ReadOnly

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

Http handler for read-only server

func (*Server) ReadWrite

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

Http handler for read-write server

func (*Server) Rename

func (s *Server) Rename(name string, w http.ResponseWriter, r *http.Request)

func (*Server) Run

func (s *Server) Run()

Run all servers

func (*Server) Save

func (s *Server) Save(name string, w http.ResponseWriter, r *http.Request)

func (*Server) StatsJson

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

Jump to

Keyboard shortcuts

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