Documentation ¶
Index ¶
- type Repository
- func (r *Repository) FindAll(addresses []string) ([]*models.Address, error)
- func (r *Repository) FindById(id uint64) (string, error)
- func (r *Repository) FindId(address string) (uint64, error)
- func (r *Repository) FindIdOrCreate(address string) (uint64, error)
- func (r *Repository) SaveAllIfNotExist(addresses []string) error
- func (r Repository) SaveFromMapIfNotExists(addresses map[string]struct{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *pg.DB) *Repository
func (*Repository) FindAll ¶
func (r *Repository) FindAll(addresses []string) ([]*models.Address, error)
func (*Repository) FindId ¶
func (r *Repository) FindId(address string) (uint64, error)
Find address id
func (*Repository) FindIdOrCreate ¶
func (r *Repository) FindIdOrCreate(address string) (uint64, error)
Find address id or create if not exist
func (*Repository) SaveAllIfNotExist ¶
func (r *Repository) SaveAllIfNotExist(addresses []string) error
func (Repository) SaveFromMapIfNotExists ¶
func (r Repository) SaveFromMapIfNotExists(addresses map[string]struct{}) error
Click to show internal directories.
Click to hide internal directories.