2022-09-19 02:54:37 -05:00
|
|
|
package annotationsimpl
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2023-11-14 17:11:01 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/annotations/accesscontrol"
|
|
|
|
|
2022-09-19 02:54:37 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/annotations"
|
2022-09-22 07:27:48 -05:00
|
|
|
"github.com/grafana/grafana/pkg/setting"
|
2022-09-19 02:54:37 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
type store interface {
|
2022-11-04 10:39:26 -05:00
|
|
|
Add(ctx context.Context, items *annotations.Item) error
|
|
|
|
AddMany(ctx context.Context, items []annotations.Item) error
|
2022-09-19 02:54:37 -05:00
|
|
|
Update(ctx context.Context, item *annotations.Item) error
|
2023-11-14 17:11:01 -06:00
|
|
|
Get(ctx context.Context, query *annotations.ItemQuery, accessResources *accesscontrol.AccessResources) ([]*annotations.ItemDTO, error)
|
2022-09-19 02:54:37 -05:00
|
|
|
Delete(ctx context.Context, params *annotations.DeleteParams) error
|
|
|
|
GetTags(ctx context.Context, query *annotations.TagsQuery) (annotations.FindTagsResult, error)
|
2022-09-22 07:27:48 -05:00
|
|
|
CleanAnnotations(ctx context.Context, cfg setting.AnnotationCleanupSettings, annotationType string) (int64, error)
|
|
|
|
CleanOrphanedAnnotationTags(ctx context.Context) (int64, error)
|
2022-09-19 02:54:37 -05:00
|
|
|
}
|