Documentation ¶
Index ¶
- func GetAccessorForTests() *sql.DB
- func IsPurpose(purpose Purpose) bool
- func IsSynStatUserOrderBy(orderBy SynStatUserOrderBy) bool
- func Reload()
- type AnonymousJson
- type Database
- type DbExpiringMedia
- type DbExportPart
- type DbHeldMedia
- type DbLastAccess
- type DbMedia
- type DbMediaAttributes
- type DbMethod
- type DbReservedMedia
- type DbSynUserStat
- type DbTask
- type DbThumbnail
- type DbUrlPreview
- type DbUserStats
- type HeldReason
- type Locatable
- type MediaTableWithContext
- func (s *MediaTableWithContext) ByUserCount(userId string) (int64, error)
- func (s *MediaTableWithContext) Delete(origin string, mediaId string) error
- func (s *MediaTableWithContext) GetByHash(sha256hash string) ([]*DbMedia, error)
- func (s *MediaTableWithContext) GetById(origin string, mediaId string) (*DbMedia, error)
- func (s *MediaTableWithContext) GetByIds(origin string, mediaIds []string) ([]*DbMedia, error)
- func (s *MediaTableWithContext) GetByLocation(datastoreId string, location string) ([]*DbMedia, error)
- func (s *MediaTableWithContext) GetByOrigin(origin string) ([]*DbMedia, error)
- func (s *MediaTableWithContext) GetByOriginQuarantine(origin string) ([]*DbMedia, error)
- func (s *MediaTableWithContext) GetByOriginUsers(origin string, userIds []string) ([]*DbMedia, error)
- func (s *MediaTableWithContext) GetByQuarantine() ([]*DbMedia, error)
- func (s *MediaTableWithContext) GetByUserId(userId string) ([]*DbMedia, error)
- func (s *MediaTableWithContext) GetDistinctDatastoreIds() ([]string, error)
- func (s *MediaTableWithContext) GetOldByOrigin(origin string, beforeTs int64) ([]*DbMedia, error)
- func (s *MediaTableWithContext) GetOldByUserId(userId string, beforeTs int64) ([]*DbMedia, error)
- func (s *MediaTableWithContext) GetOldExcluding(origins []string, beforeTs int64) ([]*DbMedia, error)
- func (s *MediaTableWithContext) IdExists(origin string, mediaId string) (bool, error)
- func (s *MediaTableWithContext) Insert(record *DbMedia) error
- func (s *MediaTableWithContext) IsHashQuarantined(sha256hash string) (bool, error)
- func (s *MediaTableWithContext) LocationExists(datastoreId string, location string) (bool, error)
- func (s *MediaTableWithContext) UpdateLocation(sourceDsId string, sourceLocation string, targetDsId string, ...) error
- type Purpose
- type SynStatUserOrderBy
- type VirtLastAccess
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAccessorForTests ¶
func IsSynStatUserOrderBy ¶
func IsSynStatUserOrderBy(orderBy SynStatUserOrderBy) bool
Types ¶
type AnonymousJson ¶
type AnonymousJson map[string]interface{}
func (*AnonymousJson) ApplyFrom ¶
func (a *AnonymousJson) ApplyFrom(val interface{}) error
func (*AnonymousJson) ApplyTo ¶
func (a *AnonymousJson) ApplyTo(val interface{}) error
func (*AnonymousJson) Scan ¶
func (a *AnonymousJson) Scan(value interface{}) error
Scan implements sql.Scanner
type Database ¶
type Database struct { Media *mediaTableStatements ExpiringMedia *expiringMediaTableStatements UserStats *userStatsTableStatements ReservedMedia *reservedMediaTableStatements MetadataView *metadataVirtualTableStatements HeldMedia *heldMediaTableStatements Thumbnails *thumbnailsTableStatements LastAccess *lastAccessTableStatements UrlPreviews *urlPreviewsTableStatements MediaAttributes *mediaAttributesTableStatements Tasks *tasksTableStatements Exports *exportsTableStatements ExportParts *exportPartsTableStatements // contains filtered or unexported fields }
func GetInstance ¶
func GetInstance() *Database
type DbExpiringMedia ¶
func (*DbExpiringMedia) IsExpired ¶
func (r *DbExpiringMedia) IsExpired() bool
type DbExportPart ¶
type DbHeldMedia ¶
type DbLastAccess ¶
type DbMediaAttributes ¶
type DbReservedMedia ¶
type DbSynUserStat ¶
type DbThumbnail ¶
type DbUrlPreview ¶
type DbUserStats ¶
type MediaTableWithContext ¶
type MediaTableWithContext struct {
// contains filtered or unexported fields
}
func (*MediaTableWithContext) ByUserCount ¶
func (s *MediaTableWithContext) ByUserCount(userId string) (int64, error)
func (*MediaTableWithContext) Delete ¶
func (s *MediaTableWithContext) Delete(origin string, mediaId string) error
func (*MediaTableWithContext) GetByHash ¶
func (s *MediaTableWithContext) GetByHash(sha256hash string) ([]*DbMedia, error)
func (*MediaTableWithContext) GetById ¶
func (s *MediaTableWithContext) GetById(origin string, mediaId string) (*DbMedia, error)
func (*MediaTableWithContext) GetByIds ¶
func (s *MediaTableWithContext) GetByIds(origin string, mediaIds []string) ([]*DbMedia, error)
func (*MediaTableWithContext) GetByLocation ¶
func (s *MediaTableWithContext) GetByLocation(datastoreId string, location string) ([]*DbMedia, error)
func (*MediaTableWithContext) GetByOrigin ¶
func (s *MediaTableWithContext) GetByOrigin(origin string) ([]*DbMedia, error)
func (*MediaTableWithContext) GetByOriginQuarantine ¶
func (s *MediaTableWithContext) GetByOriginQuarantine(origin string) ([]*DbMedia, error)
func (*MediaTableWithContext) GetByOriginUsers ¶
func (s *MediaTableWithContext) GetByOriginUsers(origin string, userIds []string) ([]*DbMedia, error)
func (*MediaTableWithContext) GetByQuarantine ¶
func (s *MediaTableWithContext) GetByQuarantine() ([]*DbMedia, error)
func (*MediaTableWithContext) GetByUserId ¶
func (s *MediaTableWithContext) GetByUserId(userId string) ([]*DbMedia, error)
func (*MediaTableWithContext) GetDistinctDatastoreIds ¶
func (s *MediaTableWithContext) GetDistinctDatastoreIds() ([]string, error)
func (*MediaTableWithContext) GetOldByOrigin ¶
func (s *MediaTableWithContext) GetOldByOrigin(origin string, beforeTs int64) ([]*DbMedia, error)
func (*MediaTableWithContext) GetOldByUserId ¶
func (s *MediaTableWithContext) GetOldByUserId(userId string, beforeTs int64) ([]*DbMedia, error)
func (*MediaTableWithContext) GetOldExcluding ¶
func (s *MediaTableWithContext) GetOldExcluding(origins []string, beforeTs int64) ([]*DbMedia, error)
func (*MediaTableWithContext) IdExists ¶
func (s *MediaTableWithContext) IdExists(origin string, mediaId string) (bool, error)
func (*MediaTableWithContext) Insert ¶
func (s *MediaTableWithContext) Insert(record *DbMedia) error
func (*MediaTableWithContext) IsHashQuarantined ¶
func (s *MediaTableWithContext) IsHashQuarantined(sha256hash string) (bool, error)
func (*MediaTableWithContext) LocationExists ¶
func (s *MediaTableWithContext) LocationExists(datastoreId string, location string) (bool, error)
func (*MediaTableWithContext) UpdateLocation ¶
type SynStatUserOrderBy ¶
type SynStatUserOrderBy string
const ( SynStatUserOrderByMediaCount SynStatUserOrderBy = "media_count" SynStatUserOrderByMediaLength SynStatUserOrderBy = "media_length" SynStatUserOrderByUserId SynStatUserOrderBy = "user_id" DefaultSynStatUserOrderBy = SynStatUserOrderByUserId )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.