account

package
v0.0.0-...-8ad73b1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Handle information related to the account, tracks wallet addresses

Index

Constants

View Source
const (
	ChainBitcoin = iota + 1
	ChainEthereum
	ChainEthereumClassic
	ChainBitcoinCash
	ChainCallisto
	ChainRavenCoin
)

Variables

This section is empty.

Functions

func UpdateAccount

func UpdateAccount(client *mongo.Client, b *bytes.Buffer) (string, error)

UpdateAccount add or update an account to the account table

Types

type Account

type Account struct {
	ID         *primitive.ObjectID `json:"id" bson:"_id,omitempty"`
	UserID     string              `json:"userid"`
	AccType    int16               `json:"account_type"`
	Blockchain int16               `json:"blockchain"`
	Symbol     *string             `json:"symbol,omitempty" bson:"symbol,omitempty"`
	Address    string              `json:"address"`
	Nickname   string              `json:"nickname"`
}

func GetAccountsForBlockchain

func GetAccountsForBlockchain(client *mongo.Client, blockchain int16) ([]Account, error)

GetAccountsForBlockchain retrieve a list of accounts for a particular blockchain.

func GetAccountsForUser

func GetAccountsForUser(client *mongo.Client, userID string) ([]Account, error)

GetAccountsForUser retrieve a list of accounts for a particular user. A user can have multiple accounts

type Chain

type Chain int16

func StringToChain

func StringToChain(symbol string) Chain

Jump to

Keyboard shortcuts

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