api

package
v0.0.0-...-a9e4aaf Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: ISC Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckValid

func CheckValid(i ImageRoute, conf config.Config) bool

Types

type API

type API struct {
	Config   config.Config
	Database database.Database
}

func (API) DeleteFile

func (api API) DeleteFile(w http.ResponseWriter, r *http.Request)

DeleteFile : delete a file from the API

func (API) GetEndpoints

func (api API) GetEndpoints(w http.ResponseWriter, r *http.Request)

func (API) ListFile

func (api API) ListFile(w http.ResponseWriter, r *http.Request)

ListFile : listing files

func (API) Login

func (api API) Login(w http.ResponseWriter, r *http.Request)

func (API) UploadHandle

func (api API) UploadHandle(w http.ResponseWriter, r *http.Request)

func (API) VerifyFile

func (api API) VerifyFile(w http.ResponseWriter, r *http.Request)

VerifyFile : Verifying user uploads

type ImageRoute

type ImageRoute struct {
	Type string `json:"type"`
	Nsfw bool   `json:"nsfw"`
}

type Multi

type Multi struct {
	API      *API
	Nsfw     bool
	Endpoint string
}

func (Multi) GetImage

func (multi Multi) GetImage(w http.ResponseWriter, r *http.Request)

GetImage : Get a single image from the DB

func (Multi) GetManyImage

func (multi Multi) GetManyImage(w http.ResponseWriter, r *http.Request)

GetManyImage : Get many images from the database

Jump to

Keyboard shortcuts

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