memos/store/tag.go

32 lines
552 B
Go
Raw Normal View History

package store
import (
"context"
)
type Tag struct {
Name string
2023-08-04 21:55:07 +08:00
CreatorID int32
}
type FindTag struct {
2023-08-04 21:55:07 +08:00
CreatorID int32
}
type DeleteTag struct {
Name string
2023-08-04 21:55:07 +08:00
CreatorID int32
}
func (s *Store) UpsertTag(ctx context.Context, upsert *Tag) (*Tag, error) {
2023-09-26 19:37:22 +08:00
return s.driver.UpsertTag(ctx, upsert)
}
func (s *Store) ListTags(ctx context.Context, find *FindTag) ([]*Tag, error) {
2023-09-26 19:37:22 +08:00
return s.driver.ListTags(ctx, find)
}
func (s *Store) DeleteTag(ctx context.Context, delete *DeleteTag) error {
2023-09-26 19:37:22 +08:00
return s.driver.DeleteTag(ctx, delete)
}