12345678910111213141516171819202122232425262728293031323334 |
- package lfs
- import (
- "context"
- "gogs.io/gogs/internal/database"
- )
- type Store interface {
-
-
- GetAccessTokenBySHA1(ctx context.Context, sha1 string) (*database.AccessToken, error)
-
-
- TouchAccessTokenByID(ctx context.Context, id int64) error
- }
- type store struct{}
- func NewStore() Store {
- return &store{}
- }
- func (*store) GetAccessTokenBySHA1(ctx context.Context, sha1 string) (*database.AccessToken, error) {
- return database.Handle.AccessTokens().GetBySHA1(ctx, sha1)
- }
- func (*store) TouchAccessTokenByID(ctx context.Context, id int64) error {
- return database.Handle.AccessTokens().Touch(ctx, id)
- }
|