Documentation
¶
Index ¶
- type Catalog
- func (c *Catalog) BasicIntegrity() ([]resource.RID, bool)
- func (c *Catalog) CID(source source.ID, platformID string) resource.CID
- func (c *Catalog) CardVersionExists(rid resource.RID, version timestamp.Nano) (bool, error)
- func (c *Catalog) CardVersions(rid resource.RID) []timestamp.Nano
- func (c *Catalog) CleanupCreators() (int, error)
- func (c *Catalog) Close() error
- func (c *Catalog) Count(filter resource.Filter) (int, error)
- func (c *Catalog) Delete(rids ...resource.RID) (int, error)
- func (c *Catalog) FindCreatorByCID(cid resource.CID) (resource.Creator, error)
- func (c *Catalog) FindCreatorByNickname(source source.ID, nickname string) (resource.Creator, error)
- func (c *Catalog) FindPagedRIDs(filter resource.Filter, offset int, limit int) ([]resource.RID, error)
- func (c *Catalog) FindRecord(rid resource.RID) (*resource.Record, error)
- func (c *Catalog) FindRecords(rids ...resource.RID) (resource.Box[resource.Record], error)
- func (c *Catalog) FindURLs(normalizedURLs ...string) ([]string, error)
- func (c *Catalog) FixRecordIntegrity(rec *resource.Record) resource.RecordIntegrity
- func (c *Catalog) GetCardBytes(rid resource.RID, version timestamp.Nano) ([]byte, error)
- func (c *Catalog) GetRawCard(rid resource.RID, version timestamp.Nano) (*png.RawCard, error)
- func (c *Catalog) GetSheet(rid resource.RID, version timestamp.Nano) (*character.Sheet, error)
- func (c *Catalog) GetSheetBytes(rid resource.RID, version timestamp.Nano) ([]byte, error)
- func (c *Catalog) RestoreCard(rec *resource.Record, characterCard *png.CharacterCard) (resource.RID, error)
- func (c *Catalog) SaveCard(metadata *models.Metadata, characterCard *png.CharacterCard, ...) (resource.RID, error)
- func (c *Catalog) TagNames() ([]string, error)
- func (c *Catalog) Thumbnail(rid resource.RID) (image.Image, error)
- func (c *Catalog) ThumbnailBytes(rid resource.RID) ([]byte, error)
- func (c *Catalog) ToggleFavorite(rid resource.RID) error
- func (c *Catalog) UpdateExportData(rid resource.RID, exportData resource.ExportData) error
- func (c *Catalog) UpdateFavoriteData(favorite bool, rids ...resource.RID) error
- func (c *Catalog) UpdateSyncData(rid resource.RID, syncData resource.SyncData) error
- func (c *Catalog) WithContext(ctx context.Context) Service
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog implements Service using record and blob stores
func (*Catalog) CardVersionExists ¶
func (*Catalog) CleanupCreators ¶
func (*Catalog) FindCreatorByCID ¶
func (*Catalog) FindCreatorByNickname ¶
func (*Catalog) FindPagedRIDs ¶
func (*Catalog) FindRecord ¶
func (*Catalog) FindRecords ¶
func (*Catalog) FixRecordIntegrity ¶
func (c *Catalog) FixRecordIntegrity(rec *resource.Record) resource.RecordIntegrity
func (*Catalog) GetCardBytes ¶
func (*Catalog) GetRawCard ¶
func (*Catalog) GetSheetBytes ¶
func (*Catalog) RestoreCard ¶
func (*Catalog) UpdateExportData ¶
func (*Catalog) UpdateFavoriteData ¶
func (*Catalog) UpdateSyncData ¶
type Service ¶
type Service interface {
Count(filter resource.Filter) (int, error)
FindPagedRIDs(filter resource.Filter, offset int, limit int) ([]resource.RID, error)
FindRecords(rids ...resource.RID) (resource.Box[resource.Record], error)
FindRecord(rid resource.RID) (*resource.Record, error)
FindCreatorByCID(cid resource.CID) (resource.Creator, error)
FindCreatorByNickname(source source.ID, nickname string) (resource.Creator, error)
FindURLs(normalizedURLs ...string) ([]string, error)
TagNames() ([]string, error)
CID(source source.ID, platformID string) resource.CID
SaveCard(metadata *models.Metadata, characterCard *png.CharacterCard, time timestamp.Nano, importIndex ...int) (resource.RID, error)
RestoreCard(rec *resource.Record, characterCard *png.CharacterCard) (resource.RID, error)
UpdateSyncData(rid resource.RID, syncData resource.SyncData) error
UpdateExportData(rid resource.RID, exportData resource.ExportData) error
UpdateFavoriteData(favorite bool, rids ...resource.RID) error
ToggleFavorite(rid resource.RID) error
GetRawCard(rid resource.RID, version timestamp.Nano) (*png.RawCard, error)
GetCardBytes(rid resource.RID, version timestamp.Nano) ([]byte, error)
GetSheet(rid resource.RID, version timestamp.Nano) (*character.Sheet, error)
GetSheetBytes(rid resource.RID, version timestamp.Nano) ([]byte, error)
Thumbnail(rid resource.RID) (image.Image, error)
ThumbnailBytes(rid resource.RID) ([]byte, error)
CardVersions(rid resource.RID) []timestamp.Nano
CardVersionExists(rid resource.RID, version timestamp.Nano) (bool, error)
BasicIntegrity() ([]resource.RID, bool)
FixRecordIntegrity(rec *resource.Record) resource.RecordIntegrity
Delete(rids ...resource.RID) (int, error)
CleanupCreators() (int, error)
WithContext(ctx context.Context) Service
Close() error
}
Service provides unified access to record and blob stores
Click to show internal directories.
Click to hide internal directories.