models

package
v0.0.0-...-a856406 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Objects map[string]*Object
)
View Source
var (
	UserList map[string]*User
)

Functions

func AddOne

func AddOne(object Object) (ObjectId string)

func AddUser

func AddUser(u User) string

func Delete

func Delete(ObjectId string)

func DeleteUser

func DeleteUser(uid string)

func GetAll

func GetAll() map[string]*Object

func GetAllUsers

func GetAllUsers() map[string]*User

func Login

func Login(username, password string) bool

func Update

func Update(ObjectId string, Score int64) (err error)

Types

type Account

type Account struct {
	AccountName                                string
	AccountType                                string
	Address                                    string
	Balance                                    int64
	Votes                                      []*Vote
	Asset                                      map[string]int64
	AssetV2                                    map[string]int64
	Frozen                                     []*Frozen
	NetUsage                                   int64
	AcquiredDelegatedFrozenBalanceForBandwidth int64
	DelegatedFrozenBalanceForBandwidth         int64
	CreateTime                                 int64
	LatestOprationTime                         int64
	Allowance                                  int64
	LatestWithdrawTime                         int64
	Code                                       string
	IsWitness                                  bool
	IsCommittee                                bool
	FrozenSupply                               []*Frozen
	AssetIssuedName                            string
	AssetIssuedID                              string
	LatestAssetOperationTime                   map[string]int64
	LatestAssetOperationTimeV2                 map[string]int64
	FreeNetUsage                               int64
	FreeAssetNetUsage                          map[string]int64
	FreeAssetNetUsageV2                        map[string]int64
	LatestConsumeTime                          int64
	LatestConsumeFreeTime                      int64
	AccountID                                  string
	AccountResource                            *AccountResource
}

func GetAccountByAddress

func GetAccountByAddress(address string) (*Account, error)

type AccountId

type AccountId struct {
	Name    string
	Address string
}

type AccountNetMessage

type AccountNetMessage struct {
	FreeNetUsed    int64
	FreeNetLimit   int64
	NetUsed        int64
	NetLimit       int64
	AssetNetUsed   map[string]int64
	AssetNetLimit  map[string]int64
	TotalNetLimit  int64
	TotalNetWeight int64
}

func GetAccountNet

func GetAccountNet(address string) AccountNetMessage

type AccountResource

type AccountResource struct {
	EnergyUsage                             int64
	FrozenBalanceForEnergy                  *Frozen
	LatestConsumeTimeForEnergy              int64
	AcquiredDelegatedFrozenBalanceForEnergy int64
	DelegatedFrozenBalanceForEnergy         int64
	StorageLimit                            int64
	StorageUsage                            int64
	LatestExchangeStorageTime               int64
}

type Acuthrity

type Acuthrity struct {
	Account        *AccountId
	PermissionName string
}

type Address

type Address struct {
	Host string
	Port int32
}

type AssetIssueContract

type AssetIssueContract struct {
	OwnerAddress            string
	Name                    string
	Abbr                    string
	TotalSupply             int64
	FrozenSupply            []FrozenSupply
	TrxNum                  int32
	Num                     int32
	StartTime               int64
	EndTime                 int64
	VoteScore               int32
	Description             string
	Url                     string
	FreeAssetNetLimit       int64
	PublicFreeAssetNetLimit int64
	PublicFreeAssetNetUsage int64
	PublicLatestFreeNetTime int64
}

func GetAssetIssueByName

func GetAssetIssueByName(name string) AssetIssueContract

type AssetIssueList

type AssetIssueList struct {
	AssetIssue []AssetIssueContract
}

func GetAssetIssueAccount

func GetAssetIssueAccount(address string) AssetIssueList

func GetAssetIssueList

func GetAssetIssueList() AssetIssueList

type Block

type Block struct {
	Transactions []*Transaction
	BlockHeader  *BlockHeader
}

func GetBlockById

func GetBlockById(id string) Block

func GetBlockByNum

func GetBlockByNum(num int64) Block

func GetNowBlock

func GetNowBlock() Block

type BlockHeader

type BlockHeader struct {
	RawData          *BlockHeaderRaw
	WitnessSignature string
}

type BlockHeaderRaw

type BlockHeaderRaw struct {
	Timestamp      int64
	TxTrieRoot     string
	ParentHash     string
	Number         int64
	WitnessId      int64
	WitnessAddress string
}

type BlockList

type BlockList struct {
	Block []*Block
}

func GetBlockByLatestNum

func GetBlockByLatestNum(num int64) BlockList

func GetBlockByLimitNext

func GetBlockByLimitNext(start, end int64) BlockList

type Contract

type Contract struct {
	Type         string
	Parameter    interface{}
	Provider     string
	ContractName string
}

type Frozen

type Frozen struct {
	FrozenBalance int64
	ExpireTime    int64
}

type FrozenSupply

type FrozenSupply struct {
	FrozenAmount int64
	FrozenDays   int64
}

type Node

type Node struct {
	Address Address
}

type NodeList

type NodeList struct {
	Nodes []Node
}

func GetNodeList

func GetNodeList() NodeList

type NumberMessage

type NumberMessage struct {
	Num int64
}

func GetNextMaintenanceTime

func GetNextMaintenanceTime() NumberMessage

func GetTotalTransaction

func GetTotalTransaction() NumberMessage

type Object

type Object struct {
	ObjectId   string
	Score      int64
	PlayerName string
}

func GetOne

func GetOne(ObjectId string) (object *Object, err error)

type Profile

type Profile struct {
	Gender  string
	Age     int
	Address string
	Email   string
}

type Result

type Result struct {
	Fee int64
	Ret string
}

type Transaction

type Transaction struct {
	RawData   *TransactionRaw
	Signature []string
	Ret       []*Result
}

func GetTransactionById

func GetTransactionById(id string) Transaction

type TransactionRaw

type TransactionRaw struct {
	RefBlockBytes string
	RefBlockNum   int64
	RefBlockHash  string
	Expiration    int64
	Auths         []*Acuthrity
	Data          string
	Contract      []*Contract
	Scripts       string
	Timestamp     int64
}

type User

type User struct {
	Id       string
	Username string
	Password string
	Profile  Profile
}

func GetUser

func GetUser(uid string) (u *User, err error)

func UpdateUser

func UpdateUser(uid string, uu *User) (a *User, err error)

type Vote

type Vote struct {
	VoteAddress string
	VoteCount   int64
}

type Witness

type Witness struct {
	Address        string
	VoteCount      int64
	PubKey         string
	Url            string
	TotalProduced  int64
	TotalMissed    int64
	LatestBlockNum int64
	LatestSlotNum  int64
	IsJobs         bool
}

type WitnessList

type WitnessList struct {
	Witnesses []Witness
}

func GetWitnessList

func GetWitnessList() WitnessList

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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