linksharing

package
v0.34.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler implements the link sharing HTTP handler

func NewHandler

func NewHandler(log *zap.Logger, config HandlerConfig) (*Handler, error)

NewHandler creates a new link sharing HTTP handler

func (*Handler) ServeHTTP

func (handler *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles link sharing requests

type HandlerConfig

type HandlerConfig struct {
	// Uplink is the uplink used to talk to the storage network
	Uplink *uplink.Uplink

	// URLBase is the base URL of the link sharing handler. It is used
	// to construct URLs returned to clients. It should be a fully formed URL.
	URLBase string
}

HandlerConfig specifies the handler configuration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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