grafana/pkg/services/shorturls/shorturl.go
ying-jeanne 7339dbc090
Chore: Refectory of shorturl service, move models into service (#61295)
Chore: refectory of shorturl service, move models into service
2023-01-12 17:13:47 +08:00

15 lines
449 B
Go

package shorturls
import (
"context"
"github.com/grafana/grafana/pkg/services/user"
)
type Service interface {
GetShortURLByUID(ctx context.Context, user *user.SignedInUser, uid string) (*ShortUrl, error)
CreateShortURL(ctx context.Context, user *user.SignedInUser, path string) (*ShortUrl, error)
UpdateLastSeenAt(ctx context.Context, shortURL *ShortUrl) error
DeleteStaleShortURLs(ctx context.Context, cmd *DeleteShortUrlCommand) error
}