storage

package
v0.0.0-...-095c751 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NameSeqProfile = pgx.Identifier{"public", "profile_id_seq"} //nolint:gochecknoglobals
)

Functions

This section is empty.

Types

type ProfileStorage

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

func NewProfileStorage

func NewProfileStorage(pool *pgxpool.Pool, metrics *mymetrics.DatabaseMetrics) *ProfileStorage

func (*ProfileStorage) AppendSubByIDs

func (pl *ProfileStorage) AppendSubByIDs(ctx context.Context, userID uint, advertID uint) bool

func (*ProfileStorage) CreateProfile

func (pl *ProfileStorage) CreateProfile(ctx context.Context, userID uint) *models.Profile

func (*ProfileStorage) GetProfileByUserID

func (pl *ProfileStorage) GetProfileByUserID(ctx context.Context, userID uint) (*models.Profile, error)

func (*ProfileStorage) SetProfileAvatarUrl

func (pl *ProfileStorage) SetProfileAvatarUrl(ctx context.Context, fullPath string, userID uint) (string, error)

func (*ProfileStorage) SetProfileCity

func (pl *ProfileStorage) SetProfileCity(ctx context.Context, userID uint, data models.City) (*models.Profile, error)

func (*ProfileStorage) SetProfileInfo

func (pl *ProfileStorage) SetProfileInfo(ctx context.Context, userID uint,
	data models.EditProfileNec) (*models.Profile, error)

func (*ProfileStorage) SetProfilePhone

func (pl *ProfileStorage) SetProfilePhone(ctx context.Context, userID uint, data models.SetProfilePhoneNec) (*models.Profile, error)

Jump to

Keyboard shortcuts

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