blizparam

package
v0.0.0-...-e1f35ab Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: LGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeActNone uint8 = iota
	TypeActClaim
	TypeActVerify
	TypeActRent
	TypeActSignCs   // 签约CS
	TypeActCancelCs // 解约CS
	TypeActSignTime
	TypeActSignFlow
	TypeActPickupTime
	TypeActPickupFlow
	TypeActPickupCost
	TypeActUsedFlow
	TypeActShareObj // Send tx for sharing obj id
	TypeActSendMail
	TypeActRegMail
)
View Source
const (
	PayMethodTime uint8 = iota
	PayMethodFlow
)
View Source
const CSPerDayCharge float64 = 1e18 // time charge
View Source
const CSPerMBCharge float64 = 1e18 // flow charge
View Source
const CSPickUpFlowMin = 10 // 1048576 * 1 // 1Mb
View Source
const CSPickUpTimeMin = 10 // 3600 * 1 // one hour
View Source
const DestAddrStr = "0x39f124f6f8911a35f19346d3940908d8f6a29543"
View Source
const SizeForUpdateState uint64 = 1 // qiwy: todo, online, such as 1mbit
View Source
const UserAuthTimes uint64 = 20 // 每次授权分成UserAuthTimes次签名

Variables

View Source
var TxCost0 = (*hexutil.Big)(big.NewInt(0))
View Source
var TxDefaultCost = (*hexutil.Big)(TxDefaultValue)
View Source
var TxDefaultValue = new(big.Int).SetInt64(1234)

Functions

func GetCsSelfPassphrase

func GetCsSelfPassphrase() string

func GetFlowBalance

func GetFlowBalance(flow uint64) *big.Int

func GetNeedBalance

func GetNeedBalance(startTime, endTime, flow uint64) *big.Int

func GetNeedFarmerCount

func GetNeedFarmerCount() int

func GetObjMetaQueryCount

func GetObjMetaQueryCount() int

func GetReadCheckCount

func GetReadCheckCount() int

func GetTimeBalance

func GetTimeBalance(seconds uint64) *big.Int

func GetWriteCheckCount

func GetWriteCheckCount() int

func SetCsSelfPassphrase

func SetCsSelfPassphrase(passphrase string)

func SetNeedFarmerCount

func SetNeedFarmerCount(count int)

func SetObjMetaQueryCount

func SetObjMetaQueryCount(count int)

func SetReadCheckCount

func SetReadCheckCount(count int)

func SetWriteCheckCount

func SetWriteCheckCount(count int)

Types

type AddrTimeFlow

type AddrTimeFlow struct {
	Addr      string
	StartTime uint64
	EndTime   uint64
	Flow      uint64
	PayMethod uint8
}

type CancelCsParam

type CancelCsParam struct {
	CsAddr string
	Now    uint64
}

type CsPickupCostParam

type CsPickupCostParam struct {
	Addr          string
	UsedFlow      uint64
	AuthAllowFlow uint64
	Sign          []byte
	Now           uint64
}

type CsUsedFlowParam

type CsUsedFlowParam struct {
	Addr string
	Flow uint64
}

type PickupFlowParam

type PickupFlowParam struct {
	Addr       string
	PickupFlow uint64
}

type PickupTimeParam

type PickupTimeParam struct {
	Addr       string
	PickupTime uint64
}

type RegMailData

type RegMailData struct {
	Name   string
	PubKey []byte
}

type SignFlowParam

type SignFlowParam struct {
	Addr      string
	AllowFlow uint64
}

type SignTimeParam

type SignTimeParam struct {
	Addr      string
	AllowTime uint64
}

type TxShareObjData

type TxShareObjData struct {
	SharingCode string
}

type UserAuthAllowFlowParam

type UserAuthAllowFlowParam struct {
	CsAddr string
	Flow   uint64
	Sign   []byte
}

Jump to

Keyboard shortcuts

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