db

package
v0.0.0-...-93b2285 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 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 CryptoRepository

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

func NewCryptoRepository

func NewCryptoRepository(db *pg.DB, log *zap.SugaredLogger) *CryptoRepository

func (*CryptoRepository) AssignAddress

func (r *CryptoRepository) AssignAddress(model *domain.Crypto, address domain.Address) error

func (*CryptoRepository) FindOutdated

func (r *CryptoRepository) FindOutdated(date time.Time, limit int) ([]*domain.Crypto, error)

func (*CryptoRepository) Get

func (r *CryptoRepository) Get(user *domain2.User, currency domain.CryptoCurrency) *domain.Crypto

func (*CryptoRepository) UpdateBalance

func (r *CryptoRepository) UpdateBalance(model *domain.Crypto) error

type SessionsRepository

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

func NewSessionsRepository

func NewSessionsRepository(db *pg.DB) *SessionsRepository

func (*SessionsRepository) Create

func (s *SessionsRepository) Create(user *domain.User, token string) error

type UserRepository

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

func NewUserRepository

func NewUserRepository(db *pg.DB) *UserRepository

func (*UserRepository) Create

func (db *UserRepository) Create(user *domain.User) error

func (*UserRepository) GetByExternalId

func (db *UserRepository) GetByExternalId(auth domain.Oauth, id string) (*domain.User, error)

func (*UserRepository) Update

func (db *UserRepository) Update(user *domain.User) error

Jump to

Keyboard shortcuts

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