Documentation ¶
Index ¶
- Variables
- func AssetHandler(prefix, root string) http.Handler
- type Api
- func (a *Api) ArchivedUsers(w http.ResponseWriter, r *http.Request)
- func (a *Api) DocListHandler(w http.ResponseWriter, r *http.Request)
- func (a *Api) ImageHandler(w http.ResponseWriter, r *http.Request)
- func (a *Api) QRCodeHandler(w http.ResponseWriter, r *http.Request)
- func (a *Api) Serve() error
- func (a *Api) SettingsHandler(w http.ResponseWriter, r *http.Request)
- func (a *Api) VideoHandler(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
View Source
var Assets embed.FS
Functions ¶
func AssetHandler ¶
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) 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
Click to show internal directories.
Click to hide internal directories.