Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrShortURLBadRequest = errutil.NewBase(errutil.StatusBadRequest, "shorturl.bad-request") ErrShortURLNotFound = errutil.NewBase(errutil.StatusNotFound, "shorturl.not-found") ErrShortURLAbsolutePath = errutil.NewBase(errutil.StatusValidationFailed, "shorturl.absolute-path", errutil.WithPublicMessage("Path should be relative")) ErrShortURLInvalidPath = errutil.NewBase(errutil.StatusValidationFailed, "shorturl.invalid-path", errutil.WithPublicMessage("Invalid short URL path")) ErrShortURLInternal = errutil.NewBase(errutil.StatusInternal, "shorturl.internal") )
Functions ¶
This section is empty.
Types ¶
type DeleteShortUrlCommand ¶
type Service ¶
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 }
Click to show internal directories.
Click to hide internal directories.