mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 14:42:24 -05:00
[chore] move caches to a separate State{} structure (#1078)
* move caches to a separate State{} structure
Signed-off-by: kim <grufwub@gmail.com>
* fix call to log.Panic not using formatted call
Signed-off-by: kim <grufwub@gmail.com>
* move caches to use interfaces, to make switchouts easier in future
Signed-off-by: kim <grufwub@gmail.com>
* fix rebase issue
Signed-off-by: kim <grufwub@gmail.com>
* improve code comment
Signed-off-by: kim <grufwub@gmail.com>
* fix further issues after rebase
Signed-off-by: kim <grufwub@gmail.com>
* heh
Signed-off-by: kim <grufwub@gmail.com>
* add missing license text
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
dd1a4cd892
commit
e58d2d8122
27 changed files with 725 additions and 332 deletions
|
|
@ -37,6 +37,8 @@ type Emoji interface {
|
|||
UpdateEmoji(ctx context.Context, emoji *gtsmodel.Emoji, columns ...string) (*gtsmodel.Emoji, Error)
|
||||
// DeleteEmojiByID deletes one emoji by its database ID.
|
||||
DeleteEmojiByID(ctx context.Context, id string) Error
|
||||
// GetEmojisByIDs gets emojis for the given IDs.
|
||||
GetEmojisByIDs(ctx context.Context, ids []string) ([]*gtsmodel.Emoji, Error)
|
||||
// GetUseableEmojis gets all emojis which are useable by accounts on this instance.
|
||||
GetUseableEmojis(ctx context.Context) ([]*gtsmodel.Emoji, Error)
|
||||
// GetEmojis gets emojis based on given parameters. Useful for admin actions.
|
||||
|
|
@ -52,6 +54,8 @@ type Emoji interface {
|
|||
GetEmojiByStaticURL(ctx context.Context, imageStaticURL string) (*gtsmodel.Emoji, Error)
|
||||
// PutEmojiCategory puts one new emoji category in the database.
|
||||
PutEmojiCategory(ctx context.Context, emojiCategory *gtsmodel.EmojiCategory) Error
|
||||
// GetEmojiCategoriesByIDs gets emoji categories for given IDs.
|
||||
GetEmojiCategoriesByIDs(ctx context.Context, ids []string) ([]*gtsmodel.EmojiCategory, Error)
|
||||
// GetEmojiCategories gets a slice of the names of all existing emoji categories.
|
||||
GetEmojiCategories(ctx context.Context) ([]*gtsmodel.EmojiCategory, Error)
|
||||
// GetEmojiCategory gets one emoji category by its id.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue