redis

package
v0.0.0-...-be74c99 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DependencySet = wire.NewSet(
	NewLogger,
	wire.Struct(new(Store), "*"),
)

Functions

This section is empty.

Types

type Logger

type Logger struct{ *log.Logger }

func NewLogger

func NewLogger(lf *log.Factory) Logger

type Store

type Store struct {
	Context     context.Context
	Redis       *appredis.Handle
	AppID       config.AppID
	Logger      Logger
	SQLBuilder  *appdb.SQLBuilderApp
	SQLExecutor *appdb.SQLExecutor
	Clock       clock.Clock
}

func (*Store) AccessWithID

func (s *Store) AccessWithID(grantID string, accessEvent access.Event, expireAt time.Time) (*oauth.OfflineGrant, error)

func (*Store) CreateAccessGrant

func (s *Store) CreateAccessGrant(grant *oauth.AccessGrant) error

func (*Store) CreateAppSession

func (s *Store) CreateAppSession(session *oauth.AppSession) error

func (*Store) CreateAppSessionToken

func (s *Store) CreateAppSessionToken(token *oauth.AppSessionToken) error

func (*Store) CreateCodeGrant

func (s *Store) CreateCodeGrant(grant *oauth.CodeGrant) error

func (*Store) CreateOfflineGrant

func (s *Store) CreateOfflineGrant(grant *oauth.OfflineGrant, expireAt time.Time) error

func (*Store) CreateSettingsActionGrant

func (s *Store) CreateSettingsActionGrant(grant *oauth.SettingsActionGrant) error

func (*Store) DeleteAccessGrant

func (s *Store) DeleteAccessGrant(grant *oauth.AccessGrant) error

func (*Store) DeleteAppSession

func (s *Store) DeleteAppSession(session *oauth.AppSession) error

func (*Store) DeleteAppSessionToken

func (s *Store) DeleteAppSessionToken(token *oauth.AppSessionToken) error

func (*Store) DeleteCodeGrant

func (s *Store) DeleteCodeGrant(grant *oauth.CodeGrant) error

func (*Store) DeleteOfflineGrant

func (s *Store) DeleteOfflineGrant(grant *oauth.OfflineGrant) error

func (*Store) DeleteSettingsActionGrant

func (s *Store) DeleteSettingsActionGrant(grant *oauth.SettingsActionGrant) error

func (*Store) GetAccessGrant

func (s *Store) GetAccessGrant(tokenHash string) (*oauth.AccessGrant, error)

func (*Store) GetAppSession

func (s *Store) GetAppSession(tokenHash string) (*oauth.AppSession, error)

func (*Store) GetAppSessionToken

func (s *Store) GetAppSessionToken(tokenHash string) (*oauth.AppSessionToken, error)

func (*Store) GetCodeGrant

func (s *Store) GetCodeGrant(codeHash string) (*oauth.CodeGrant, error)

func (*Store) GetOfflineGrant

func (s *Store) GetOfflineGrant(id string) (*oauth.OfflineGrant, error)

func (*Store) GetSettingsActionGrant

func (s *Store) GetSettingsActionGrant(codeHash string) (*oauth.SettingsActionGrant, error)

func (*Store) ListClientOfflineGrants

func (s *Store) ListClientOfflineGrants(clientID string, userID string) ([]*oauth.OfflineGrant, error)

func (*Store) ListOfflineGrants

func (s *Store) ListOfflineGrants(userID string) ([]*oauth.OfflineGrant, error)

func (*Store) UpdateOfflineGrantApp2AppDeviceKey

func (s *Store) UpdateOfflineGrantApp2AppDeviceKey(grantID string, newKey string, expireAt time.Time) (*oauth.OfflineGrant, error)

func (*Store) UpdateOfflineGrantAuthenticatedAt

func (s *Store) UpdateOfflineGrantAuthenticatedAt(grantID string, authenticatedAt time.Time, expireAt time.Time) (*oauth.OfflineGrant, error)

func (*Store) UpdateOfflineGrantDeviceInfo

func (s *Store) UpdateOfflineGrantDeviceInfo(grantID string, deviceInfo map[string]interface{}, expireAt time.Time) (*oauth.OfflineGrant, error)

Jump to

Keyboard shortcuts

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