Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FmtFields = []*formatter.Field[StockAsset]{ { Name: "sha", Header: "SHA", Show: true, Getter: func(a StockAsset) any { return a.Model().SHA }, }, { Name: "name", Header: "NAME", Show: true, Getter: func(a StockAsset) any { return a.BaseName() }, }, { Name: "url", Header: "URL", Show: true, Getter: func(a StockAsset) any { url := a.Model().Url if url == "" { return "<none>" } return url }, }, { Name: "fhash", Header: "FHASH", Show: true, Getter: func(a StockAsset) any { return a.Model().FHash }, }, { Name: "created", Header: "CREATED", Show: true, Getter: func(a StockAsset) any { return a.Model().Created }, }, { Name: "size", Header: "SIZE", Show: true, Getter: func(a StockAsset) any { s, err := a.Content().Size() if err != nil { return content.IllegalSize } return s }, }, { Name: "tags", Header: "TAGS", Show: true, Getter: func(sa StockAsset) any { tags := sa.Model().Tags return strings.Join(tags, ", ") }, }, }
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type ExternalLoader ¶
type StockAsset ¶
type StockAsset interface { Asset Model() *db.AssetModel CompareCreated(other StockAsset) int }
type StockLoader ¶
type StockLoader func(db.Context) (StockAsset, error)
func FromDBModel ¶
func FromDBModel(app core.App, model *db.AssetModel, upstream Asset) StockLoader
type Transform ¶
type Transform interface {
Model() db.StepListTpl
}
type Update ¶
type Update interface {
// contains filtered or unexported methods
}
func MergeUpdates ¶
func UpdateContent ¶
func UpdateFileExtension ¶
Click to show internal directories.
Click to hide internal directories.