defaultstore

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package defaultstore implements the SQL-backed default store for the oauth plugin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultOAuthStore

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

DefaultOAuthStore implements oauthtypes.Store using a SQL database.

func NewDefaultOAuthStore

func NewDefaultOAuthStore(db *sql.DB, dialect plugins.Dialect) (*DefaultOAuthStore, error)

NewDefaultOAuthStore creates a DefaultOAuthStore for the given dialect.

func (*DefaultOAuthStore) CreateConnection

func (s *DefaultOAuthStore) CreateConnection(ctx context.Context, conn oauthtypes.Connection) (*oauthtypes.Connection, error)

CreateConnection persists a new OAuth provider connection and returns it.

func (*DefaultOAuthStore) DeleteConnection

func (s *DefaultOAuthStore) DeleteConnection(ctx context.Context, provider, userID string) error

DeleteConnection removes the OAuth connection for the given provider and user ID.

func (*DefaultOAuthStore) GetConnectionByProviderUserID

func (s *DefaultOAuthStore) GetConnectionByProviderUserID(ctx context.Context, provider, providerUserID string) (*oauthtypes.Connection, error)

GetConnectionByProviderUserID retrieves an OAuth connection by provider name and the provider-assigned user ID.

func (*DefaultOAuthStore) GetConnectionsByUserID

func (s *DefaultOAuthStore) GetConnectionsByUserID(ctx context.Context, userID string) ([]oauthtypes.Connection, error)

GetConnectionsByUserID returns all OAuth connections associated with a user.

func (*DefaultOAuthStore) UpdateConnection

func (s *DefaultOAuthStore) UpdateConnection(ctx context.Context, conn oauthtypes.Connection) error

UpdateConnection updates an existing OAuth provider connection.

Jump to

Keyboard shortcuts

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