controllers

package
v0.0.0-...-0ad5614 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config *database.Pastebin_Config = database.Config
View Source
var ErrNotMultiPart = errors.New("bad request: not multipart/form-data")
View Source
var HTML_MIME = [...]string{"text/html", "application/xhtml+xml"}

Functions

func AddUser

func AddUser(c echo.Context) error

func CheckURL

func CheckURL(c echo.Context) error

func DeletePaste

func DeletePaste(c echo.Context) error

func EditUserProfile

func EditUserProfile(c echo.Context) error

func GetPaste

func GetPaste(c echo.Context) error

func GetTotalPasteSize

func GetTotalPasteSize(c echo.Context) error

func GetUser

func GetUser(c echo.Context) error

func GetUserPasteSize

func GetUserPasteSize(c echo.Context) error

func LegacyIndex

func LegacyIndex(c echo.Context) error

func LegacyLogin

func LegacyLogin(c echo.Context) error

func LegacyLogout

func LegacyLogout(c echo.Context) error

func LegacyMethod

func LegacyMethod(c echo.Context) error

func LegacyPaste

func LegacyPaste(c echo.Context) error

func LegacyPasteDelete

func LegacyPasteDelete(c echo.Context) error

func LegacyPasteResponse

func LegacyPasteResponse(c echo.Context, paste *database.Paste, err error) error

func LegacyPasteText

func LegacyPasteText(c echo.Context) error

func LegacyRender

func LegacyRender(c echo.Context, extra_params map[string]any) error

func NewPaste

func NewPaste(c echo.Context) error

func PasteAccess

func PasteAccess(c echo.Context) error

func PasteList

func PasteList(c echo.Context) error

func QueryPaste

func QueryPaste(c echo.Context) error

func UpdatePaste

func UpdatePaste(c echo.Context) error

func UserLogin

func UserLogin(c echo.Context) error

func UserLogout

func UserLogout(c echo.Context) error

func UserMiddleware

func UserMiddleware(next echo.HandlerFunc) echo.HandlerFunc

func UserPasteList

func UserPasteList(c echo.Context) error

func UserWebAuthnDelete

func UserWebAuthnDelete(c echo.Context) error

func UserWebAuthnDiscoverableLogin

func UserWebAuthnDiscoverableLogin(c echo.Context) error

func UserWebAuthnDiscoverableLoginRequest

func UserWebAuthnDiscoverableLoginRequest(c echo.Context) error

func UserWebAuthnList

func UserWebAuthnList(c echo.Context) error

func UserWebAuthnLogin

func UserWebAuthnLogin(c echo.Context) error

func UserWebAuthnLoginRequest

func UserWebAuthnLoginRequest(c echo.Context) error

func UserWebAuthnRegister

func UserWebAuthnRegister(c echo.Context) error

func UserWebAuthnRegisterRequest

func UserWebAuthnRegisterRequest(c echo.Context) error

Types

type PasteInfo

type PasteInfo struct {
	UUID                 string `json:"uuid"`
	UID                  int64  `json:"uid"`
	Hash                 string `json:"hash"`
	Digest               string `json:"digest"`
	ExpireAfter          string `json:"expire_after"`
	AccessCount          int64  `json:"access_count"`
	MaxAccessCount       int64  `json:"max_access_count"`
	DeleteIfNotAvailable bool   `json:"delete_if_not_available"`
	CreatedAt            string `json:"created_at"`
	Short_url            string `json:"short_url"`
	MimeType             string `json:"mime_type"`
	FileName             string `json:"filename"`
	Size                 uint64 `json:"size"`
	HasPassword          bool   `json:"has_password"`
	HoldCount            int64  `json:"hold_count"`
	HoleBefore           string `json:"hold_before"`
	URL                  string `json:"url"`
}

func ToPasteInfo

func ToPasteInfo(paste *database.Paste) *PasteInfo

type UserInfo

type UserInfo struct {
	UID      int64  `json:"uid" db:"uid"`
	Username string `json:"username" db:"username"`
	Email    string `json:"email" db:"email"`
	Role     string `json:"role" db:"role"`
}

Source Files

  • config.go
  • legacy.go
  • paste.go
  • session.go
  • user.go

Jump to

Keyboard shortcuts

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