api

package
v0.0.0-...-15eb0b2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Assets embed.FS

Functions

func AssetHandler

func AssetHandler(prefix, root string) http.Handler

AssetHandler handles static files such as index.html, *.css, *.js etc.

Types

type Api

type Api struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, ns pkg.Namespace, config *common.Config, ca common.CookieAcceptor, sess *session.Session) *Api

New Api instance using and db ns config

func (*Api) ArchivedUsers

func (a *Api) ArchivedUsers(w http.ResponseWriter, r *http.Request)

func (*Api) DocListHandler

func (a *Api) DocListHandler(w http.ResponseWriter, r *http.Request)

DocListHandler handles tweet list call

func (*Api) ImageHandler

func (a *Api) ImageHandler(w http.ResponseWriter, r *http.Request)

func (*Api) QRCodeHandler

func (a *Api) QRCodeHandler(w http.ResponseWriter, r *http.Request)

func (*Api) Serve

func (a *Api) Serve() error

Serve http server

func (*Api) SettingsHandler

func (a *Api) SettingsHandler(w http.ResponseWriter, r *http.Request)

SettingsHandler handles post settings call

func (*Api) VideoHandler

func (a *Api) VideoHandler(w http.ResponseWriter, r *http.Request)

VideoHandler handles media resource (binary) fetching Only support jpg image and mp4 video for now

Jump to

Keyboard shortcuts

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