pmhttp

package
v0.0.0-...-2208570 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const HTML = `` /* 3304-byte string literal not displayed */
View Source
const JS = `` /* 881-byte string literal not displayed */

Variables

This section is empty.

Functions

func ServeIndex

func ServeIndex(w http.ResponseWriter)

func ServeJS

func ServeJS(w http.ResponseWriter)

Types

type AutoServer

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

func NewAutoServer

func NewAutoServer() *AutoServer

func (*AutoServer) Broadcast

func (a *AutoServer) Broadcast(name, data string)

func (*AutoServer) ServeHTTP

func (a *AutoServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Config

type Config struct {
	ID           string
	RepoURL      string
	BlobRepoURL  string
	RatePeriod   int
	RootKeys     []repo.KeyConfig
	StatusConfig struct {
		Enabled bool
	}
	Auto    bool
	BlobKey *struct {
		Data [32]uint8
	}
}

type ConfigServer

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

func NewConfigServer

func NewConfigServer(rootKeyFetcher func() []byte, encryptionKey string) *ConfigServer

func (*ConfigServer) ServeHTTP

func (c *ConfigServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

type GZIPWriter

type GZIPWriter struct {
	http.ResponseWriter
	*gzip.Writer
}

func (*GZIPWriter) Flush

func (w *GZIPWriter) Flush()

func (*GZIPWriter) Header

func (w *GZIPWriter) Header() http.Header

func (*GZIPWriter) Write

func (w *GZIPWriter) Write(b []byte) (int, error)

type LoggingWriter

type LoggingWriter struct {
	http.ResponseWriter
	Status int
}

func (*LoggingWriter) Flush

func (lw *LoggingWriter) Flush()

func (*LoggingWriter) WriteHeader

func (lw *LoggingWriter) WriteHeader(status int)

type RemoteAddr

type RemoteAddr string

Jump to

Keyboard shortcuts

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