postgres

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresRepository

type PostgresRepository struct {
	*sqlc.Queries
}

type Session added in v0.4.0

type Session struct {
	sqlc.Session
}

func (Session) ExpireAt added in v0.4.0

func (s Session) ExpireAt() time.Time

func (Session) ID added in v0.4.0

func (s Session) ID() gosesh.Identifier

func (Session) IdleAt added in v0.4.0

func (s Session) IdleAt() time.Time

func (Session) UserID added in v0.4.0

func (s Session) UserID() gosesh.Identifier

type Store

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

func New

func New(db sqlc.DBTX) *Store

func (*Store) CreateSession

func (s *Store) CreateSession(ctx context.Context, r gosesh.CreateSessionRequest) (gosesh.Session, error)

func (*Store) DeleteSession

func (s *Store) DeleteSession(ctx context.Context, identifier gosesh.Identifier) error

func (*Store) DeleteUserSessions

func (s *Store) DeleteUserSessions(ctx context.Context, identifier gosesh.Identifier) (int, error)

func (*Store) GetSession

func (s *Store) GetSession(ctx context.Context, identifier gosesh.Identifier) (gosesh.Session, error)

func (*Store) UpsertUser

func (s *Store) UpsertUser(ctx context.Context, user gosesh.OAuth2User) (gosesh.Identifier, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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