post

package
v0.0.0-...-8577a5a Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeletePost

func DeletePost(r tx.Request) (interface{}, error)

func GetPost

func GetPost(r tx.Request) (interface{}, error)

func ListPosts

func ListPosts(r tx.Request) (interface{}, error)

func Mount

func Mount(m tx.Middlewarer) http.Handler

func SetPostPermission

func SetPostPermission(r tx.Request) (interface{}, error)

SetPostPermission: /{id}?p=0

func TagPost

func TagPost(r tx.Request) (interface{}, error)

func UntagPost

func UntagPost(r tx.Request) (interface{}, error)

func UploadPost

func UploadPost(r tx.Request) (interface{}, error)

Types

type ListParams

type ListParams struct {
	Query string `schema:"q"`
	Count uint   `schema:"c"`
	Page  uint   `schema:"p"`
}

ListParams is the URL parameter for post listing pagination.

type PostPermission

type PostPermission struct {
	Permission smolboard.Permission `schema:"p,required"`
}

type Tag

type Tag struct {
	Tag string `schema:"t,required"`
}

type UploadParams

type UploadParams struct {
	Permission smolboard.Permission `schema:"p"` // default Normal
}

Jump to

Keyboard shortcuts

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