mirror of
https://github.com/usememos/memos.git
synced 2024-11-11 09:22:51 +08:00
ca98367a0a
* Move all vacuum code into driver * Remove db from Store
31 lines
552 B
Go
31 lines
552 B
Go
package store
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Tag struct {
|
|
Name string
|
|
CreatorID int32
|
|
}
|
|
|
|
type FindTag struct {
|
|
CreatorID int32
|
|
}
|
|
|
|
type DeleteTag struct {
|
|
Name string
|
|
CreatorID int32
|
|
}
|
|
|
|
func (s *Store) UpsertTag(ctx context.Context, upsert *Tag) (*Tag, error) {
|
|
return s.driver.UpsertTag(ctx, upsert)
|
|
}
|
|
|
|
func (s *Store) ListTags(ctx context.Context, find *FindTag) ([]*Tag, error) {
|
|
return s.driver.ListTags(ctx, find)
|
|
}
|
|
|
|
func (s *Store) DeleteTag(ctx context.Context, delete *DeleteTag) error {
|
|
return s.driver.DeleteTag(ctx, delete)
|
|
}
|