Documentation ¶
Index ¶
- Constants
- Variables
- func CompareNoCap(a, b string) int
- func MustJSON(s string, e error) string
- type CallOpts
- type Contract
- func (c *Contract) AddEveryDay(no ...string) (e error)
- func (c *Contract) AddHot(no ...string) (e error)
- func (c *Contract) AddNodes(copyOld bool, ts time.Time, ss ...string) (e error)
- func (c *Contract) AddOrUpdateVideo(no string, message VideoMessage, update bool) (e error)
- func (c *Contract) AddTagVideos(tag string, date string, no ...string) (e error)
- func (c *Contract) AddVideo(no string, message VideoMessage) (e error)
- func (c *Contract) Call(ctx context.Context, opt CallOpts) error
- func (c *Contract) Close()
- func (c *Contract) DeployDHC(name, symbol string, decimal uint8) (addr *common.Address, e error)
- func (c *Contract) DeployMessage() (addr *common.Address, e error)
- func (c *Contract) DeployNode() (addr *common.Address, e error)
- func (c *Contract) DeployTag(msgAddr *common.Address) (addr *common.Address, e error)
- func (c *Contract) Ethereum(address common.Address) (i uint64, e error)
- func (c *Contract) GetBalance(address common.Address) (b int64, e error)
- func (c *Contract) GetNodes(ts time.Time) ([]string, *big.Int, error)
- func (c *Contract) GetSymbol() (s string, e error)
- func (c *Contract) GetTagVideos(tag, date string) (v []VideoMessage, i int64, e error)
- func (c *Contract) GetVersion(device int64) (version string, hash string, e error)
- func (c *Contract) GetVideo(no string) (messages VideoMessage, err error)
- func (c *Contract) GetVideos(no string) (messages []VideoMessage, size int64, err error)
- func (c *Contract) Mint(addr common.Address, val int64) (e error)
- func (c *Contract) OpenMessageAuthority() (e error)
- func (c *Contract) Primary(addr common.Address) (e error)
- func (c *Contract) Register(p Type, v interface{})
- func (c *Contract) RemoveNode(idx int)
- func (c *Contract) SetVersion(device int64, version string, hash string) (e error)
- func (c *Contract) Transact(ctx context.Context, opt TransactOpts) error
- func (c *Contract) Transfer(from common.Address, val int64) (e error)
- func (c *Contract) TransferEthereum(to common.Address, val int64) (e error)
- func (c *Contract) UnlockDo(account string, pass string, fn func(*Contract)) (err error)
- func (c *Contract) UpdateVideo(no string, message VideoMessage) (e error)
- type Options
- type TransactOpts
- type Type
- type VideoMessage
Constants ¶
const EthAbs18 = 1000000000000000000
EthAbs18 ...
const PrivateKey = `` /* 3243-byte string literal not displayed */
PrivateKey ...
const PublicKey = `` /* 1801-byte string literal not displayed */
PublicKey ...
const TimeStampFormat = "20060102"
TimeStampFormat ...
Variables ¶
var DefaultDHCAddress = "0x8a4eaf49809f936c6f94e28210a73cf3d8b82ff6"
DefaultDHCAddress ... var DefaultDHCAddress = "0x89b92612b9795f8bfed840df9a33a0a3d6745250" var DefaultDHCAddress = "0x25cf28eb90427b8fb63baa19d8c9d23b55a12289"
var DefaultGasLimit = "0x7A1200"
DefaultGasLimit ...
var DefaultGatway = "http://127.0.0.1:8545"
DefaultGatway ... var DefaultGatway = "http://139.196.215.224:8545" var DefaultGatway = "http://13.124.213.107:8545"
var DefaultMessageAddress = "0x4833267bde3aa043803a1fa8c3e071f708367da4"
DefaultMessageAddress ...
var DefaultNodeAddress = "0x3c87dad9055b8075a8515d5c5a68d72d0d2c099e"
DefaultNodeAddress ...
var DefaultTagAddress = "0x8d64f6d57c7ee984cce09f89969f706216ac03d9"
DefaultTagAddress ...
var DefaultTransferAddress = "0x945d35cd4a6549213e8d37feb5d708ec98906902"
DefaultTransferAddress ...
Functions ¶
Types ¶
type Contract ¶
type Contract struct {
// contains filtered or unexported fields
}
Contract ...
func (*Contract) AddEveryDay ¶
AddEveryDay ...
func (*Contract) AddOrUpdateVideo ¶
func (c *Contract) AddOrUpdateVideo(no string, message VideoMessage, update bool) (e error)
AddOrUpdateVideo ...
func (*Contract) AddTagVideos ¶
AddTagVideos ...
func (*Contract) AddVideo ¶
func (c *Contract) AddVideo(no string, message VideoMessage) (e error)
AddVideo ...
func (*Contract) DeployMessage ¶
DeployMessage ...
func (*Contract) DeployNode ¶
DeployNode ...
func (*Contract) GetBalance ¶
GetBalance ...
func (*Contract) GetTagVideos ¶
func (c *Contract) GetTagVideos(tag, date string) (v []VideoMessage, i int64, e error)
GetTagVideos ...
func (*Contract) GetVersion ¶
GetVersion ...
func (*Contract) GetVideo ¶
func (c *Contract) GetVideo(no string) (messages VideoMessage, err error)
GetVideo ...
func (*Contract) GetVideos ¶
func (c *Contract) GetVideos(no string) (messages []VideoMessage, size int64, err error)
GetVideos ...
func (*Contract) OpenMessageAuthority ¶
OpenMessageAuthority ...
func (*Contract) SetVersion ¶
SetVersion ...
func (*Contract) Transact ¶
func (c *Contract) Transact(ctx context.Context, opt TransactOpts) error
Transact ...
func (*Contract) TransferEthereum ¶
TransferEthereum ...
func (*Contract) UpdateVideo ¶
func (c *Contract) UpdateVideo(no string, message VideoMessage) (e error)
UpdateVideo ...
type TransactOpts ¶
type TransactOpts func(c *Contract, opts *bind.TransactOpts) (*types.Transaction, error)
TransactOpts ...
type VideoMessage ¶
type VideoMessage struct { ID string `json:"id"` Content string `json:"content"` Version string `json:"version"` }
VideoMessage ...
func DecodeMessages ¶
func DecodeMessages(s []string) (m []VideoMessage, e error)
DecodeMessages ...