address

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByBalance added in v0.2.6

type ByBalance []ResourceTopAddresses

func (ByBalance) Len added in v0.2.6

func (a ByBalance) Len() int

func (ByBalance) Less added in v0.2.6

func (a ByBalance) Less(i, j int) bool

func (ByBalance) Swap added in v0.2.6

func (a ByBalance) Swap(i, j int)

type Repository

type Repository struct {
	DB *pg.DB
}

func NewRepository

func NewRepository(db *pg.DB) *Repository

func (Repository) GetBalancesByCoinSymbol

func (repository Repository) GetBalancesByCoinSymbol(coinSymbol string, pagination *tools.Pagination) []models.Balance

Get address model by address

func (Repository) GetByAddress

func (repository Repository) GetByAddress(noahAddress string) *models.Address

Get address model by address

func (Repository) GetByAddresses

func (repository Repository) GetByAddresses(noahAddresses []string) []models.Address

Get list of addresses models

func (Repository) GetPaginatedAddresses added in v0.2.7

func (repository Repository) GetPaginatedAddresses(pagination *tools.Pagination) []models.Address

Get paginated list of addresses

type Resource

type Resource struct {
	Address  string               `json:"address"`
	Balances []resource.Interface `json:"balances"`
}

func (Resource) Transform

func (r Resource) Transform(model resource.ItemInterface, resourceParams ...resource.ParamInterface) resource.Interface

type ResourceTopAddresses added in v0.2.6

type ResourceTopAddresses struct {
	Address string `json:"address"`
	Balance string `json:"balance"`
}

func (ResourceTopAddresses) Transform added in v0.2.6

func (ResourceTopAddresses) TransformCollection added in v0.2.7

func (r ResourceTopAddresses) TransformCollection(model []models.Address, pagination tools.Pagination) resource.PaginationResource

Jump to

Keyboard shortcuts

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