auth/internal/ticket/repository.go

16 lines
364 B
Go
Raw Normal View History

2021-12-30 00:27:52 +00:00
package ticket
import (
"context"
"source.toby3d.me/toby3d/auth/internal/domain"
2021-12-30 00:27:52 +00:00
)
type Repository interface {
Create(ctx context.Context, ticket *domain.Ticket) error
GetAndDelete(ctx context.Context, ticket string) (*domain.Ticket, error)
GC()
2021-12-30 00:27:52 +00:00
}
var ErrNotExist error = domain.NewError(domain.ErrorCodeInvalidRequest, "ticket not exist or expired", "")