package auth
import "git.sr.ht/~pingoo/stdx/auth"
Index ¶
- func CreateAccount(ctx context.Context, db db.Queryer, accountID uuid.UUID, password string) (err error)
- func CreateSession(ctx context.Context, db db.Queryer, accountID uuid.UUID) (token string, err error)
- func DeleteAccount(ctx context.Context, db db.Queryer, accountID uuid.UUID) (err error)
- func DeleteSession(ctx context.Context, db db.Queryer, token string) (err error)
- func RefreshSession(ctx context.Context, db db.Queryer, oldToken string) (newToken string, err error)
- type Account
- type ApiKey
- type Session
Functions ¶
func CreateAccount ¶
func CreateAccount(ctx context.Context, db db.Queryer, accountID uuid.UUID, password string) (err error)
func CreateSession ¶
func CreateSession(ctx context.Context, db db.Queryer, accountID uuid.UUID) (token string, err error)
func DeleteAccount ¶
func DeleteSession ¶
func RefreshSession ¶
func RefreshSession(ctx context.Context, db db.Queryer, oldToken string) (newToken string, err error)
Types ¶
type Account ¶
type ApiKey ¶
type Session ¶
func GetSessionsForAccount ¶
func GetSessionsForAccount(ctx context.Context, db db.Queryer, accountID uuid.UUID) (sessions []Session, err error)
Source Files ¶
accounts.go apikeys.go sessions.go
- Version
- v0.0.0-20240218134121-094174641f6e (latest)
- Published
- Feb 18, 2024
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 4 months ago –
Tools for package owners.