api

package
v0.0.0-...-a4359f9 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidBlurAmount = fmt.Errorf("Invalid blur amount")
)

Errors

Functions

This section is empty.

Types

type API

type API struct {
	Database        database.Provider
	Log             *logger.Logger
	Tracer          *tracing.Tracer
	RootURL         string
	ImageServiceURL string
	HandlerTimeout  time.Duration
	HMAC            *hmac.HMAC
}

API is a http api

func (*API) Router

func (a *API) Router() (http.Handler, error)

Router returns a http router

type DeprecatedImage

type DeprecatedImage struct {
	Format    string `json:"format"`
	Width     int    `json:"width"`
	Height    int    `json:"height"`
	Filename  string `json:"filename"`
	ID        int    `json:"id"`
	Author    string `json:"author"`
	AuthorURL string `json:"author_url"`
	PostURL   string `json:"post_url"`
}

DeprecatedImage contains info about an image, in the old deprecated /list style

type ListImage

type ListImage struct {
	database.Image
	DownloadURL string `json:"download_url"`
}

ListImage contains metadata and download information about an image

Jump to

Keyboard shortcuts

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