usecase

package
v0.1.36 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 52 Imported by: 0

Documentation

Overview

Package usecase provides application use cases.

For the Dependency Rule it is not allowed to import platform.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFavorite added in v0.0.17

func AddFavorite(deps FavoriteDeps) usecase.Interactor

func AddMessage added in v0.0.6

func AddMessage(deps addMessageDeps) usecase.Interactor

func CollectStats added in v0.0.7

func CollectStats(deps collectStatsDeps) usecase.Interactor

func DeleteFavorite added in v0.0.17

func DeleteFavorite(deps FavoriteDeps) usecase.Interactor

func DownloadAlbum

func DownloadAlbum(deps dlAlbumDeps) usecase.Interactor

func DownloadGpx

func DownloadGpx(deps dlGpxDeps) usecase.Interactor

func DownloadImagesPoiGpx

func DownloadImagesPoiGpx(deps getAlbumImagesDeps) usecase.Interactor

ShowAlbum creates use case interactor to show album.

func GetAlbumContents

func GetAlbumContents(deps getAlbumImagesDeps) usecase.IOInteractorOf[getAlbumInput, getAlbumOutput]

GetAlbumContents creates use case interactor to get album data.

func GetAlbums

func GetAlbums(deps getAlbumsDeps) usecase.Interactor

GetAlbums creates use case interactor to get album data.

func GetFavorite added in v0.0.17

func GetFavorite(deps FavoriteDeps) usecase.Interactor

func GetImageInfo

func GetImageInfo(deps getImageInfoDeps) usecase.Interactor

func MapTile

func MapTile(deps *service.Locator) usecase.Interactor

func NotFound

func NotFound(deps notFoundDeps) usecase.IOInteractorOf[struct{}, web.Page]

NotFound creates use case interactor to show Not Found page.

func OG

func SearchImages added in v0.0.12

func SearchImages(deps getAlbumImagesDeps) usecase.Interactor

SearchImages creates use case interactor to show images for criteria.

func ServeFavicon

func ServeFavicon(deps serveFaviconDeps) usecase.Interactor

func ServeSiteFile

func ServeSiteFile(deps interface{}) usecase.Interactor

func ServeSitemap added in v0.1.35

func ServeSitemap(deps interface {
	CtxdLogger() ctxd.Logger
	Settings() settings.Values
	PhotoAlbumFinder() uniq.Finder[photo.Album]
}) usecase.Interactor

func SharePixelpeep added in v0.1.35

func SharePixelpeep() usecase.Interactor

SharePixelpeep renders a read-only pixelpeep view from a JSON config passed as a query parameter, e.g. /pixelpeep?config=... (as produced by "Copy link" in the editor from ShowPixelpeep).

func ShowAlbum

func ShowAlbum(deps getAlbumImagesDeps) usecase.IOInteractorOf[showAlbumInput, web.Page]

ShowAlbum creates use case interactor to show album.

func ShowAlbumAtImage

func ShowAlbumAtImage(up usecase.IOInteractorOf[showAlbumInput, web.Page]) usecase.Interactor

func ShowAlbumSprite added in v0.1.35

func ShowAlbumSprite(deps showAlbumSpriteDeps) usecase.Interactor

func ShowImage

func ShowImage(deps showImageDeps, forceDownload bool) usecase.Interactor

func ShowMain

func ShowMain(deps showMainDeps) usecase.IOInteractorOf[showMainInput, web.Page]

ShowMain creates use case interactor to show album.

func ShowMain2 added in v0.1.35

func ShowMain2(deps showMainDeps) usecase.IOInteractorOf[showMainInput, web.Page]

ShowMain2 creates use case interactor to show album.

func ShowPano

func ShowPano(deps showPanoDeps) usecase.Interactor

ShowPano creates use case interactor to show pano.

func ShowPixelpeep added in v0.1.35

func ShowPixelpeep(deps pixelpeepDeps) usecase.Interactor

ShowPixelpeep renders the pixelpeep editor for 2-4 images given by comma-separated hash, e.g. /pixelpeep-<hash1>,<hash2>. Use its "Copy link" button to share a read-only view (see SharePixelpeep).

func ShowThumb

func ShowThumb(deps showThumbDeps) usecase.Interactor

func ShowThumbGrid added in v0.1.35

func ShowThumbGrid(deps showThumbGridDeps) usecase.Interactor

Types

type AlbumPageBuilder added in v0.1.35

type AlbumPageBuilder struct {
	// contains filtered or unexported fields
}

func NewAlbumPageBuilder added in v0.1.35

func NewAlbumPageBuilder(deps getAlbumImagesDeps) *AlbumPageBuilder

type FavoriteDeps added in v0.0.17

type FavoriteDeps interface {
	FavoriteRepository() *storage.FavoriteRepository
}

type Image

type Image struct {
	Name            string          `json:"name"`
	Hash            string          `json:"hash"`
	Width           int64           `json:"width"`
	Height          int64           `json:"height"`
	BlurHash        string          `json:"blur_hash,omitempty"`
	Gps             *photo.Gps      `json:"gps,omitempty"`
	Exif            *photo.Exif     `json:"exif,omitempty"`
	Description     string          `json:"description,omitempty"`
	DescriptionHTML template.HTML   `json:"description_html,omitempty"`
	AISays          string          `json:"ai_says,omitempty"`
	Is360Pano       bool            `json:"is_360_pano,omitempty"`
	Size            int64           `json:"size,omitempty"`
	UTime           int64           `json:"utime"`
	Meta            *photo.MetaData `json:"meta,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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