router

package
v0.0.0-...-75d57e1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_EXPIRATION_HOURS = 24 * 365 * 2

Variables

This section is empty.

Functions

This section is empty.

Types

type BrowserClientHandler

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

func NewBrowserClientHandler

func NewBrowserClientHandler(db *badger.DB) BrowserClientHandler

func (BrowserClientHandler) ServeHTTP

func (c BrowserClientHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type CreatePage

type CreatePage struct {
	Meta          Meta
	Expiration    time.Time
	MinExpiration time.Time
	Error         *ErrorResponse
}

type ErrorResponse

type ErrorResponse struct {
	StatusCode   int
	ErrorMessage string
}

type Meta

type Meta struct {
	Title       string
	Description string
}

type ResultPage

type ResultPage struct {
	Meta      Meta
	Paste     string
	Exp       time.Time
	Filename  string
	Slug      string
	IsCreator bool
}

type TtyClientHandler

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

func NewTtyClientHandler

func NewTtyClientHandler(db *badger.DB) TtyClientHandler

func (TtyClientHandler) ServeHTTP

func (c TtyClientHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type VariantHandler

type VariantHandler struct {
	Db *badger.DB
}

func (VariantHandler) ServeHTTP

func (rh VariantHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type Views

type Views struct {
	// contains filtered or unexported fields
}
var OurViews *Views

func New

func New() *Views

Jump to

Keyboard shortcuts

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