Documentation
¶
Index ¶
- Variables
- type DepositRecord
- func (d DepositRecord) Address() base.Address
- func (d DepositRecord) Amount(cid string) *common.Big
- func (d DepositRecord) Bytes() []byte
- func (d *DepositRecord) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (d *DepositRecord) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (d DepositRecord) IsValid([]byte) error
- func (d DepositRecord) Items() map[string]DepositRecordItem
- func (d DepositRecord) MarshalBSON() ([]byte, error)
- func (d DepositRecord) MarshalJSON() ([]byte, error)
- func (d *DepositRecord) SetItem(cid string, am common.Big, ts uint64)
- func (d DepositRecord) TransferredAt(cid string) *uint64
- type DepositRecordBSONUnmarshaler
- type DepositRecordItem
- type DepositRecordJSONMarshaler
- type DepositRecordJSONUnmarshaler
- type Design
- func (de Design) AccountSetting(account string) *Setting
- func (de Design) AccountSettings() map[string]Setting
- func (de *Design) AddAccountSetting(setting Setting) error
- func (de Design) Bytes() []byte
- func (de *Design) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (de *Design) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (de Design) GenerateHash() util.Hash
- func (de Design) Hash() util.Hash
- func (de Design) IsValid([]byte) error
- func (de Design) MarshalBSON() ([]byte, error)
- func (de Design) MarshalJSON() ([]byte, error)
- func (de *Design) RemoveAccountSetting(account base.Address) error
- func (de *Design) UpdateAccountSetting(account Setting) error
- type DesignBSONUnmarshaler
- type DesignJSONMarshaler
- type DesignJSONUnmarshaler
- type Setting
- func (s Setting) Address() base.Address
- func (s Setting) Bytes() []byte
- func (s *Setting) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (s *Setting) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (s Setting) IsValid([]byte) error
- func (s Setting) Items() map[string]SettingItem
- func (s Setting) MarshalBSON() ([]byte, error)
- func (s Setting) MarshalJSON() ([]byte, error)
- func (s Setting) PeriodTime(cid string) *[3]uint64
- func (s *Setting) Remove(cid string) error
- func (s *Setting) SetItem(cid string, tLimit common.Big, startTime, endTime, duration uint64)
- func (s Setting) TransferLimit(cid string) *common.Big
- type SettingBSONUnmarshaler
- type SettingItem
- type SettingJSONMarshaler
- type SettingJSONUnmarshaler
Constants ¶
This section is empty.
Variables ¶
View Source
var DepositRecordHint = hint.MustNewHint("mitum-payment-deposit-record-v0.0.1")
View Source
var DesignHint = hint.MustNewHint("mitum-payment-design-v0.0.1")
View Source
var SettingHint = hint.MustNewHint("mitum-payment-setting-v0.0.1")
Functions ¶
This section is empty.
Types ¶
type DepositRecord ¶
type DepositRecord struct {
hint.BaseHinter
// contains filtered or unexported fields
}
func NewDepositRecord ¶
func NewDepositRecord( address base.Address, ) DepositRecord
func NewEmptyDepositRecord ¶
func NewEmptyDepositRecord() DepositRecord
func (DepositRecord) Address ¶
func (d DepositRecord) Address() base.Address
func (DepositRecord) Bytes ¶
func (d DepositRecord) Bytes() []byte
func (*DepositRecord) DecodeBSON ¶
func (d *DepositRecord) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*DepositRecord) DecodeJSON ¶
func (d *DepositRecord) DecodeJSON(b []byte, enc encoder.Encoder) error
func (DepositRecord) IsValid ¶
func (d DepositRecord) IsValid([]byte) error
func (DepositRecord) Items ¶
func (d DepositRecord) Items() map[string]DepositRecordItem
func (DepositRecord) MarshalBSON ¶
func (d DepositRecord) MarshalBSON() ([]byte, error)
func (DepositRecord) MarshalJSON ¶
func (d DepositRecord) MarshalJSON() ([]byte, error)
func (*DepositRecord) SetItem ¶
func (d *DepositRecord) SetItem(cid string, am common.Big, ts uint64)
func (DepositRecord) TransferredAt ¶
func (d DepositRecord) TransferredAt(cid string) *uint64
type DepositRecordBSONUnmarshaler ¶
type DepositRecordBSONUnmarshaler struct {
Hint string `bson:"_hint"`
Address string `bson:"address"`
Items map[string]DepositRecordItem `bson:"items"`
}
type DepositRecordItem ¶
type DepositRecordItem struct {
Amount common.Big `bson:"amount" json:"amount"`
TransferredAt uint64 `bson:"transferred_at" json:"transferred_at"`
}
func NewDepositRecordItem ¶
func NewDepositRecordItem(am common.Big, ts uint64) DepositRecordItem
func (DepositRecordItem) IsValid ¶
func (d DepositRecordItem) IsValid([]byte) error
type DepositRecordJSONMarshaler ¶
type DepositRecordJSONMarshaler struct {
hint.BaseHinter
Address base.Address `json:"address"`
Items map[string]DepositRecordItem `json:"items"`
}
type DepositRecordJSONUnmarshaler ¶
type DepositRecordJSONUnmarshaler struct {
Hint hint.Hint `json:"_hint"`
Address string `json:"address"`
Items map[string]DepositRecordItem `json:"items"`
}
type Design ¶
type Design struct {
hint.BaseHinter
// contains filtered or unexported fields
}
func (Design) AccountSetting ¶
func (Design) AccountSettings ¶
func (*Design) AddAccountSetting ¶
func (Design) GenerateHash ¶
func (Design) MarshalBSON ¶
func (Design) MarshalJSON ¶
func (*Design) RemoveAccountSetting ¶
func (*Design) UpdateAccountSetting ¶
type DesignBSONUnmarshaler ¶
type DesignJSONMarshaler ¶
type DesignJSONMarshaler struct {
hint.BaseHinter
Accounts map[string]Setting `json:"transfer_settings"`
}
type DesignJSONUnmarshaler ¶
type DesignJSONUnmarshaler struct {
Hint hint.Hint `json:"_hint"`
Accounts json.RawMessage `json:"transfer_settings"`
}
type Setting ¶
type Setting struct {
hint.BaseHinter
// contains filtered or unexported fields
}
func NewSettings ¶
func (Setting) Items ¶
func (s Setting) Items() map[string]SettingItem
func (Setting) MarshalBSON ¶
func (Setting) MarshalJSON ¶
func (Setting) PeriodTime ¶
type SettingBSONUnmarshaler ¶
type SettingBSONUnmarshaler struct {
Hint string `bson:"_hint"`
Address string `bson:"address"`
Items map[string]SettingItem `bson:"items"`
}
type SettingItem ¶
type SettingItem struct {
TransferLimit common.Big `bson:"transfer_limit" json:"transfer_limit"`
StartTime uint64 `bson:"start_time" json:"start_time"`
EndTime uint64 `bson:"end_time" json:"end_time"`
Duration uint64 `bson:"duration" json:"duration"`
}
func NewSettingItem ¶
func NewSettingItem(tL common.Big, st, et, dur uint64) SettingItem
func (SettingItem) IsValid ¶
func (t SettingItem) IsValid([]byte) error
type SettingJSONMarshaler ¶
type SettingJSONMarshaler struct {
hint.BaseHinter
Address base.Address `json:"address"`
Items map[string]SettingItem `json:"items"`
}
type SettingJSONUnmarshaler ¶
type SettingJSONUnmarshaler struct {
Hint hint.Hint `json:"_hint"`
Address string `json:"address"`
Items map[string]SettingItem `json:"items"`
}
Click to show internal directories.
Click to hide internal directories.