postgres

package
v0.0.0-...-99fda48 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminRepository

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

func NewAdminRepository

func NewAdminRepository(db *postgres.Db) *AdminRepository

func (*AdminRepository) GetAdmin

func (r *AdminRepository) GetAdmin(ctx context.Context, userID int) (entity.Admin, error)

GetAdmin returns admin by user id

type AppRepository

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

func NewAppRepository

func NewAppRepository(db *postgres.Db) *AppRepository

func (*AppRepository) GetApp

func (r *AppRepository) GetApp(ctx context.Context, id int) (entity.App, error)

type UserRepository

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

func NewUserRepository

func NewUserRepository(db *postgres.Db) *UserRepository

func (*UserRepository) GetUser

func (r *UserRepository) GetUser(ctx context.Context, email string) (entity.User, error)

GetUser returns user by email

func (*UserRepository) SaveUser

func (r *UserRepository) SaveUser(ctx context.Context, user entity.User) (int64, error)

SaveUser saves user to the database

Jump to

Keyboard shortcuts

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