Documentation
¶
Overview ¶
Package postgres provides a Postgres Store implementation and schema migration for Canopy.
Index ¶
- Constants
- type Store
- func (s *Store) ConsumeVerification(ctx context.Context, identifier, value string, now time.Time) (*canopy.Verification, error)
- func (s *Store) CreateAccount(ctx context.Context, a *canopy.Account) error
- func (s *Store) CreateSession(ctx context.Context, ses *canopy.Session) error
- func (s *Store) CreateUser(ctx context.Context, u *canopy.User) error
- func (s *Store) CreateUserAccount(ctx context.Context, u *canopy.User, a *canopy.Account) error
- func (s *Store) CreateVerification(ctx context.Context, v *canopy.Verification) error
- func (s *Store) DeleteExpiredVerifications(ctx context.Context, now time.Time) error
- func (s *Store) DeleteSessionByToken(ctx context.Context, token string) error
- func (s *Store) DeleteUserSessions(ctx context.Context, userID string) error
- func (s *Store) FindAccount(ctx context.Context, providerID, accountID string) (*canopy.Account, error)
- func (s *Store) FindAccountByUserProvider(ctx context.Context, userID, providerID string) (*canopy.Account, error)
- func (s *Store) FindSessionByToken(ctx context.Context, token string) (*canopy.SessionData, error)
- func (s *Store) FindUserByEmail(ctx context.Context, email string) (*canopy.User, error)
- func (s *Store) FindUserByID(ctx context.Context, id string) (*canopy.User, error)
- func (s *Store) Migrate(ctx context.Context) error
- func (s *Store) UpdateAccount(ctx context.Context, a *canopy.Account) error
- func (s *Store) UpdateSession(ctx context.Context, ses *canopy.Session) error
- func (s *Store) UpdateUser(ctx context.Context, u *canopy.User) error
Constants ¶
View Source
const Migration = `` /* 1937-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) ConsumeVerification ¶
func (*Store) CreateAccount ¶
func (*Store) CreateSession ¶
func (*Store) CreateUserAccount ¶ added in v0.1.1
func (*Store) CreateVerification ¶
func (*Store) DeleteExpiredVerifications ¶
func (*Store) DeleteSessionByToken ¶
func (*Store) DeleteUserSessions ¶
func (*Store) FindAccount ¶
func (*Store) FindAccountByUserProvider ¶
func (*Store) FindSessionByToken ¶
func (*Store) FindUserByEmail ¶
func (*Store) FindUserByID ¶
func (*Store) UpdateAccount ¶
func (*Store) UpdateSession ¶
Click to show internal directories.
Click to hide internal directories.