apiv1

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: AGPL-3.0 Imports: 7 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.Config
	DB  storage.DB

	Lexers *[]string

	Version *string

	TitleMaxLen *int
	BodyMaxLen  *int
	MaxLifeTime *int64

	ServerAbout *string
	ServerRules *string

	AdminName *string
	AdminMail *string
}

func Load

func Load(cfg config.Config) Data

func (Data) GetHand

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

GET /api/v1/get

func (Data) GetServerInfoHand

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

GET /api/v1/getServerInfo

func (Data) MainHand

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

GET /api/v1/

func (Data) NewHand

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

POST /api/v1/new

Jump to

Keyboard shortcuts

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