pmhttp

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 16 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

View Source
var (
	OutOfRangeError = errors.New("out of range error")
)

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
	RootVersion   uint32 `json:"rootVersion,omitempty"`
	RootThreshold uint32 `json:"rootThreshold,omitempty"`
	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 ConfigServerV2

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

func NewConfigServerV2

func NewConfigServerV2(rootKeyFetcher func() []byte, persist bool) *ConfigServerV2

func (*ConfigServerV2) ServeHTTP

func (c *ConfigServerV2) 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
	ResponseSize int64
}

func (*LoggingWriter) Flush

func (lw *LoggingWriter) Flush()

func (*LoggingWriter) Write

func (lw *LoggingWriter) Write(b []byte) (int, error)

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