mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 13:39:19 -06:00
7339dbc090
Chore: refectory of shorturl service, move models into service
15 lines
449 B
Go
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
|
|
}
|