2022-12-21 14:22:32 +03:00
|
|
|
package store
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
)
|
|
|
|
|
2023-07-02 13:56:25 +03:00
|
|
|
type Tag struct {
|
2022-12-21 14:22:32 +03:00
|
|
|
Name string
|
2023-08-04 16:55:07 +03:00
|
|
|
CreatorID int32
|
2022-12-21 14:22:32 +03:00
|
|
|
}
|
|
|
|
|
2023-07-02 13:56:25 +03:00
|
|
|
type FindTag struct {
|
2023-08-04 16:55:07 +03:00
|
|
|
CreatorID int32
|
2022-12-21 14:22:32 +03:00
|
|
|
}
|
|
|
|
|
2023-07-02 13:56:25 +03:00
|
|
|
type DeleteTag struct {
|
|
|
|
Name string
|
2023-08-04 16:55:07 +03:00
|
|
|
CreatorID int32
|
2023-07-02 13:56:25 +03:00
|
|
|
}
|
|
|
|
|
2023-07-04 05:05:57 +03:00
|
|
|
func (s *Store) UpsertTag(ctx context.Context, upsert *Tag) (*Tag, error) {
|
2023-09-26 14:37:22 +03:00
|
|
|
return s.driver.UpsertTag(ctx, upsert)
|
2022-12-21 14:22:32 +03:00
|
|
|
}
|
|
|
|
|
2023-07-02 13:56:25 +03:00
|
|
|
func (s *Store) ListTags(ctx context.Context, find *FindTag) ([]*Tag, error) {
|
2023-09-26 14:37:22 +03:00
|
|
|
return s.driver.ListTags(ctx, find)
|
2022-12-21 14:22:32 +03:00
|
|
|
}
|
|
|
|
|
2023-07-02 13:56:25 +03:00
|
|
|
func (s *Store) DeleteTag(ctx context.Context, delete *DeleteTag) error {
|
2023-09-26 14:37:22 +03:00
|
|
|
return s.driver.DeleteTag(ctx, delete)
|
2022-12-21 14:22:32 +03:00
|
|
|
}
|