controllers

package
v0.0.0-...-f768453 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 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 DefaultAttachmentExtensions = [...]string{"7z", "bz2", "gz", "rar", "tar", "xz", "zip", "iso", "img", "docx", "doc", "ppt", "pptx", "xls", "xlsx", "exe", "msixbundle", "apk"}
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 GetUser

func GetUser(c echo.Context) 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"`
}

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"`
}

Jump to

Keyboard shortcuts

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