repositories

package
v0.0.0-...-6436baa Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventsRepository

func NewEventsRepository(pubSubClient *pubsub.Client) models.EventsRepository

func NewImageRepository

func NewImageRepository(cloudClient *storage.Client, bucketName string) models.ImageRepository

func NewTokenRepository

func NewTokenRepository(redisClient *redis.Client) models.TokenRepository

NewTokenRepository Initializing User Repositories

func NewUserRepository

func NewUserRepository(db *sqlx.DB) models.UserRepository

Types

type PostgresUserRepository

type PostgresUserRepository struct {
	DB *sqlx.DB
}

func (*PostgresUserRepository) Create

func (*PostgresUserRepository) FindByEmail

func (r *PostgresUserRepository) FindByEmail(ctx context.Context, email string) (*models.User, error)

func (*PostgresUserRepository) FindByID

func (r *PostgresUserRepository) FindByID(ctx context.Context, uid uuid.UUID) (*models.User, error)

func (*PostgresUserRepository) Update

func (*PostgresUserRepository) UpdateImage

func (r *PostgresUserRepository) UpdateImage(ctx context.Context, uid uuid.UUID, imageURL string) (*models.User, error)

UpdateImage Update a user's image separately from other account details

Jump to

Keyboard shortcuts

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