app

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: AGPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Album

type Album struct {
	Title       string
	Description string
	Images      []Image
}

type App

type App struct {
	Authorization string
	Rdb           *redis.Client
	Content       *embed.FS
}

func CreateApp

func CreateApp(authorization string) (*App, error)

func (*App) AlbumHandler

func (a *App) AlbumHandler(w http.ResponseWriter, uri string)

func (*App) DirectImageHandler

func (a *App) DirectImageHandler(w http.ResponseWriter, uri string)

func (*App) GalleryHandler

func (a *App) GalleryHandler(w http.ResponseWriter, r *http.Request, uri string)

func (*App) GetAlbum

func (a *App) GetAlbum(w http.ResponseWriter, uri string, endpoint string)

func (*App) GetGallery added in v0.1.1

func (a *App) GetGallery(w http.ResponseWriter, r *http.Request, uri string)

func (*App) HTTPServer

func (a *App) HTTPServer(w http.ResponseWriter, r *http.Request)

func (*App) ImageHandler

func (a *App) ImageHandler(w http.ResponseWriter, r *http.Request, uri string)

func (*App) ParseAlbum

func (a *App) ParseAlbum(contents []byte) *Album

func (*App) ParseImage

func (a *App) ParseImage(contents []byte) (string, error)

type DirectImage

type DirectImage struct {
	Contents      []byte
	ContentLength string
	ContentType   string
}

type Image

type Image struct {
	Title       string
	Description string
	Link        string
	Video       bool
}

type RequestError

type RequestError struct {
	StatusCode int
	Err        error
}

func (*RequestError) Error

func (r *RequestError) Error() string

Jump to

Keyboard shortcuts

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