Documentation ¶
Index ¶
- Constants
- func AddAccount(account Account) bool
- func AddCompany(company Company) bool
- func DeleteAccount(id int32) bool
- func DeleteAccountVip(id int32) bool
- func Financing(accountID int32, companyID int32) bool
- func SetCompany(id int32, company Company) bool
- func TransferAccount(id int32, account Account) bool
- type Account
- type AccountReturn
- type Admin
- type Company
- type CompanyReturn
- type User
Constants ¶
View Source
const DATAPATH string = "data/db.db"
DATAPATH define
View Source
const URL string = "http://localhost:8545"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct { ID int32 `json:"id,omitempty"` Money int32 `json:"money,omitempty"` ACompany Company `json:"ACompany,omitempty"` BCompany Company `json:"BCompany,omitempty"` }
Account define
func GetAccountByCompanyID ¶
GetAccountByCompanyID method
type AccountReturn ¶
type AccountReturn struct { ID int32 `json:"a,omitempty"` ACompany int32 `json:"b,omitempty"` BCompany int32 `json:"c,omitempty"` Money int32 `json:"d,omitempty"` }
AccountReturn define
type Admin ¶
type Admin struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` }
Admin define
type Company ¶
type Company struct { ID int32 `json:"id,omitempty"` Name string `json:"name,omitempty"` Trusty int32 `json:"trusty,omitempty"` Money int32 `json:"money,omitempty"` }
Company define
type CompanyReturn ¶
type CompanyReturn struct { ID int32 `json:"a,omitempty"` Name string `json:"b,omitempty"` Trusty int32 `json:"c,omitempty"` Money int32 `json:"d,omitempty"` }
CompanyReturn define
Click to show internal directories.
Click to hide internal directories.