store

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func New

func New(dbPath string) (*Store, error)

func (*Store) CreateAccessToken

func (s *Store) CreateAccessToken(token *models.AccessToken) error

Access Token operations

func (*Store) CreateClient added in v0.2.0

func (s *Store) CreateClient(client *models.OAuthClient) error

func (*Store) CreateDeviceCode

func (s *Store) CreateDeviceCode(dc *models.DeviceCode) error

Device Code operations

func (*Store) DeleteClient added in v0.2.0

func (s *Store) DeleteClient(clientID string) error

func (*Store) DeleteDeviceCode

func (s *Store) DeleteDeviceCode(deviceCode string) error

func (*Store) DeleteExpiredDeviceCodes

func (s *Store) DeleteExpiredDeviceCodes() error

func (*Store) DeleteExpiredTokens

func (s *Store) DeleteExpiredTokens() error

func (*Store) GetAccessToken

func (s *Store) GetAccessToken(token string) (*models.AccessToken, error)

func (*Store) GetAccessTokenByID added in v0.2.0

func (s *Store) GetAccessTokenByID(tokenID string) (*models.AccessToken, error)

func (*Store) GetClient

func (s *Store) GetClient(clientID string) (*models.OAuthClient, error)

OAuth Client operations

func (*Store) GetClientsByIDs added in v0.2.0

func (s *Store) GetClientsByIDs(clientIDs []string) (map[string]*models.OAuthClient, error)

func (*Store) GetDeviceCode

func (s *Store) GetDeviceCode(deviceCode string) (*models.DeviceCode, error)

func (*Store) GetDeviceCodeByUserCode

func (s *Store) GetDeviceCodeByUserCode(userCode string) (*models.DeviceCode, error)

func (*Store) GetTokensByUserID added in v0.2.0

func (s *Store) GetTokensByUserID(userID string) ([]models.AccessToken, error)

func (*Store) GetUserByID

func (s *Store) GetUserByID(id string) (*models.User, error)

func (*Store) GetUserByUsername

func (s *Store) GetUserByUsername(username string) (*models.User, error)

User operations

func (*Store) Health

func (s *Store) Health() error

Health checks the database connection

func (*Store) ListClients added in v0.2.0

func (s *Store) ListClients() ([]models.OAuthClient, error)

func (*Store) RevokeToken added in v0.2.0

func (s *Store) RevokeToken(tokenID string) error

func (*Store) RevokeTokensByClientID added in v0.2.0

func (s *Store) RevokeTokensByClientID(clientID string) error

func (*Store) RevokeTokensByUserID added in v0.2.0

func (s *Store) RevokeTokensByUserID(userID string) error

func (*Store) UpdateClient added in v0.2.0

func (s *Store) UpdateClient(client *models.OAuthClient) error

func (*Store) UpdateDeviceCode

func (s *Store) UpdateDeviceCode(dc *models.DeviceCode) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL