Documentation
¶
Index ¶
- Variables
- type Service
- func (s *Service) Create(ctx context.Context, userID, name string, expiresAt *time.Time) (model.APIToken, string, error)
- func (s *Service) Delete(ctx context.Context, id string) error
- func (s *Service) GenerateToken() (plainToken string, hash string)
- func (s *Service) ListByUser(ctx context.Context, userID string) ([]model.APIToken, error)
- func (s *Service) Update(ctx context.Context, token model.APIToken) (model.APIToken, error)
- func (s *Service) ValidateToken(ctx context.Context, plainToken string) (model.APIToken, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo storage.APITokenRepository) *Service
func (*Service) GenerateToken ¶
func (*Service) ListByUser ¶
Click to show internal directories.
Click to hide internal directories.