pgstore

package
v0.0.0-...-e6e7638 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound       = errors.New("not found")
	ErrNotImplemented = errors.New("not implemeted")
)

Functions

This section is empty.

Types

type PGStore

type PGStore struct {
}

func (PGStore) CreateOAuthState

func (s PGStore) CreateOAuthState(ctx context.Context, next string) (string, error)

func (PGStore) CreateSession

func (s PGStore) CreateSession(ctx context.Context, user *usertypes.User, accessToken string) (*sessiontypes.Session, error)

func (PGStore) CreateSessionNonce

func (s PGStore) CreateSessionNonce(ctx context.Context, sessionID string) (string, error)

func (PGStore) CreateUser

func (s PGStore) CreateUser(ctx context.Context, emailAddress string, avatarURL string) (*usertypes.User, error)

func (PGStore) CreateUserToken

func (s PGStore) CreateUserToken(ctx context.Context, userID string) (string, error)

func (PGStore) GetAverageDownloadSpeed

func (s PGStore) GetAverageDownloadSpeed(ctx context.Context) (float64, error)

func (PGStore) GetAveragePingTime

func (s PGStore) GetAveragePingTime(ctx context.Context) (float64, error)

func (PGStore) GetConnectedDishyCount

func (s PGStore) GetConnectedDishyCount(ctx context.Context) (int, error)

func (PGStore) GetDishy

func (s PGStore) GetDishy(ctx context.Context, id string) (*dishytypes.Dishy, error)

func (PGStore) GetDishyForUser

func (s PGStore) GetDishyForUser(ctx context.Context, id string, userID string) (*dishytypes.Dishy, error)

func (PGStore) GetDishyTimezoneOffset

func (s PGStore) GetDishyTimezoneOffset(ctx context.Context, id string) (int, error)

func (PGStore) GetDishyVersions

func (s PGStore) GetDishyVersions(ctx context.Context, id string) (string, string, error)

func (PGStore) GetHighestDownloadSpeed

func (s PGStore) GetHighestDownloadSpeed(ctx context.Context) (float64, error)

func (PGStore) GetLowestPingTime

func (s PGStore) GetLowestPingTime(ctx context.Context) (float64, error)

func (PGStore) GetNewDishyCount

func (s PGStore) GetNewDishyCount(ctx context.Context) (int, error)

func (PGStore) GetOAuthState

func (s PGStore) GetOAuthState(ctx context.Context, id string) (bool, string, error)

func (PGStore) GetQueuedEmails

func (s PGStore) GetQueuedEmails(ctx context.Context) ([]*mailertypes.Email, error)

func (PGStore) GetSession

func (s PGStore) GetSession(ctx context.Context, id string) (*sessiontypes.Session, error)

func (PGStore) GetSessionNonce

func (s PGStore) GetSessionNonce(ctx context.Context, id string) (string, error)

func (PGStore) GetToken

func (s PGStore) GetToken(ctx context.Context, token string) (*tokentypes.Token, error)

func (PGStore) GetTotalDishyCount

func (s PGStore) GetTotalDishyCount(ctx context.Context) (int, error)

func (PGStore) GetUserByDishy

func (s PGStore) GetUserByDishy(ctx context.Context, id string) (*usertypes.User, error)

func (PGStore) GetUserByEmail

func (s PGStore) GetUserByEmail(ctx context.Context, email string) (*usertypes.User, error)

func (PGStore) GetUserByID

func (s PGStore) GetUserByID(ctx context.Context, id string) (*usertypes.User, error)

func (PGStore) IsNotFound

func (s PGStore) IsNotFound(err error) bool

func (PGStore) ListDishies

func (s PGStore) ListDishies(ctx context.Context, userID string) ([]*dishytypes.Dishy, error)

func (PGStore) MarkQueuedEmailError

func (s PGStore) MarkQueuedEmailError(ctx context.Context, id string) error

func (PGStore) MarkQueuedEmailSent

func (s PGStore) MarkQueuedEmailSent(ctx context.Context, id string) error

func (PGStore) QueueEmail

func (s PGStore) QueueEmail(ctx context.Context, fromAddress string, toAddress string, templateID int64, templateContext map[string]interface{}) (*mailertypes.Email, error)

func (PGStore) SetDishyLastReceivedStats

func (s PGStore) SetDishyLastReceivedStats(ctx context.Context, id string, when time.Time) error

func (PGStore) UpdateDishyGeo

func (s PGStore) UpdateDishyGeo(ctx context.Context, id string, when time.Time, geo *dishytypes.GeoCheck) error

Jump to

Keyboard shortcuts

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