apiv1

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Log logger.Logger
	DB  storage.DB

	RateLimitNew *netshare.RateLimitSystem
	RateLimitGet *netshare.RateLimitSystem

	Lexers []string

	Version string

	TitleMaxLen int
	BodyMaxLen  int
	MaxLifeTime int64

	ServerAbout      string
	ServerRules      string
	ServerTermsOfUse string

	AdminName string
	AdminMail string

	LenPasswdFile string

	UiDefaultLifeTime string
}

func Load

func Load(db storage.DB, cfg config.Config) *Data

func (*Data) Hand

func (data *Data) Hand(rw http.ResponseWriter, req *http.Request)

func (*Data) MainHand

func (data *Data) MainHand(rw http.ResponseWriter, req *http.Request)

GET /api/v1/

Jump to

Keyboard shortcuts

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