queries

package
v0.0.0-...-4aa44aa Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stats

type Stats struct {
	Users      int        `json:"users"`
	Thumbnails StoreStats `json:"thumbnails"`
	Tracks     StoreStats `json:"tracks"`
}

type StatsHandler

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

func NewStatsHandler

func NewStatsHandler(
	trackStore TrackStore,
	thumbnailStore ThumbnailStore,
	transactionProvider TransactionProvider,
) *StatsHandler

func (*StatsHandler) Execute

func (h *StatsHandler) Execute() (Stats, error)

type StoreStats

type StoreStats struct {
	AllItems       int64 `json:"allItems"`
	ConvertedItems int64 `json:"convertedItems"`
	OriginalSize   int64 `json:"originalSize"`
	ConvertedSize  int64 `json:"convertedSize"`
}

type ThumbnailStore

type ThumbnailStore interface {
	GetStats() (StoreStats, error)
}

type TrackStore

type TrackStore interface {
	GetStats() (StoreStats, error)
}

type TransactableRepositories

type TransactableRepositories struct {
	Users UserRepository
}

type TransactionHandler

type TransactionHandler func(repositories *TransactableRepositories) error

type TransactionProvider

type TransactionProvider interface {
	Read(handler TransactionHandler) error
}

type UserRepository

type UserRepository interface {
	Count() (int, error)
}

Jump to

Keyboard shortcuts

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