background

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	ID       string `json:"id"`
	URL      string `json:"url"`
	Thumb    string `json:"thumb,omitempty"`
	BlurHash string `json:"blur_hash"`
	// This can be used to supply extra information from an image provider to clients
	Info interface{} `json:"info,omitempty"`
}

Image represents an image which can be used as a project background

type Provider

type Provider interface {
	// Search is used to either return a pre-defined project of Image or let the user search for an image
	Search(s *xorm.Session, search string, page int64) (result []*Image, err error)
	// Set sets an image which was most likely previously obtained by Search as project background
	Set(s *xorm.Session, image *Image, project *models.Project, auth web.Auth) (err error)
}

Provider represents something that is able to get a project of images and set one of them as background

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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