constant

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ContextUserID is the key used to store current user ID into the request context
	ContextUserID key = iota
	// ContextUser is the key used to store current user into the request context
	ContextUser
	// ContextRequestID is the key used to store request ID into the request context
	ContextRequestID
	// ContextIncomingWebhook is the key used to store incoming webhook into the request context
	ContextIncomingWebhook
	// ContextIsAdmin is true when the user is an admin
	ContextIsAdmin
	// ContextDownloader is the key used to store downloader service (uggly hack)
	ContextDownloader
)
View Source
const (
	// ContentTypeBinary for binary Content-Type
	ContentTypeBinary = "application/octet-stream"
	// ContentTypeForm for URL encoded form Content-Type
	ContentTypeForm = "application/x-www-form-urlencoded"
	// ContentTypeJSON for JSON Content-Type
	ContentTypeJSON = "application/json; charset=utf-8"
	// ContentTypeHTML for HTML Content-Type
	ContentTypeHTML = "text/html; charset=utf-8"
	// ContentTypeText for text Content-Type
	ContentTypeText = "text/plain; charset=utf-8"
	// ContentTypeEpub for EPUB Content-Type
	ContentTypeEpub = "application/epub+zip"
)
View Source
const CacheMaxAge = 86400 * 90

CacheMaxAge (~3 months)

View Source
const DefaultTimeout = time.Duration(5 * time.Second)

DefaultTimeout for HTTP requests

View Source
const UserAgent = "Mozilla/5.0 (compatible; Readflow/1.0; +https://github.com/ncarlier/readflow)"

UserAgent used by HTTP client

Variables

View Source
var DefaultClient = &http.Client{
	Timeout: DefaultTimeout,
}

DefaultClient is the default HTTP client

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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