Documentation ¶
Index ¶
- Variables
- type RefreshTokenRepo
- func (r *RefreshTokenRepo) Create(token domain.RefreshToken) (uint, error)
- func (r *RefreshTokenRepo) Delete(ID uint) error
- func (r *RefreshTokenRepo) GetAll() ([]*domain.RefreshToken, error)
- func (r *RefreshTokenRepo) GetByToken(token domain.RefreshToken) (*domain.RefreshToken, error)
- func (r *RefreshTokenRepo) GetByTokenNonceHash(nonceHash string) (*domain.RefreshToken, error)
- func (r *RefreshTokenRepo) Update(token *domain.RefreshToken) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ProviderSet provides an RefreshTokenRepo for use in production. ProviderSet = wire.NewSet(Provide, wire.Bind(new(domain.RefreshTokenRepository), new(*RefreshTokenRepo))) )
Functions ¶
This section is empty.
Types ¶
type RefreshTokenRepo ¶
func Provide ¶
func Provide(manager *database.Manager) *RefreshTokenRepo
Provide returns a RefreshTokenRepo configured with the provided Manager.
func (*RefreshTokenRepo) Create ¶
func (r *RefreshTokenRepo) Create(token domain.RefreshToken) (uint, error)
Create creates a new RefreshToken in the database.
func (*RefreshTokenRepo) Delete ¶
func (r *RefreshTokenRepo) Delete(ID uint) error
Delete deletes the RefreshToken from the database with the given ID.
func (*RefreshTokenRepo) GetAll ¶
func (r *RefreshTokenRepo) GetAll() ([]*domain.RefreshToken, error)
GetAll gets all RefreshTokens in the database.
func (*RefreshTokenRepo) GetByToken ¶
func (r *RefreshTokenRepo) GetByToken(token domain.RefreshToken) (*domain.RefreshToken, error)
GetByToken gets a RefreshToken from the database where the token_hash field matches the provided RefreshToken's hash.
func (*RefreshTokenRepo) GetByTokenNonceHash ¶
func (r *RefreshTokenRepo) GetByTokenNonceHash(nonceHash string) (*domain.RefreshToken, error)
GetByTokenNonceHash gets the first found RefreshToken in the database where the token_nonce_hash field matches the provided nonceHash.
func (*RefreshTokenRepo) Update ¶
func (r *RefreshTokenRepo) Update(token *domain.RefreshToken) error
Update updates the revoked status in the database for the provided RefreshToken.
Click to show internal directories.
Click to hide internal directories.