Documentation ¶
Index ¶
- Constants
- Variables
- func AssetStatusNames() []string
- func ContractStatusNames() []string
- func DLRStatusNames() []string
- func GetCDRMapping(ctx *vmstore.VMContext, hash *types.Hash) ([]*types.Address, error)
- func GetContractParam(ctx *vmstore.VMContext, addr *types.Address) ([]byte, error)
- func GetContractsAddressByPartyANextStop(store ledger.Store, addr *types.Address, nextStop string) (*types.Address, error)
- func GetContractsAddressByPartyBPreStop(store ledger.Store, addr *types.Address, preStop string) (*types.Address, error)
- func GetMultiPartyCDRStatus(store ledger.Store, firstAddr, secondAddr *types.Address) (map[types.Address][]*CDRStatus, error)
- func GetNextStopNames(ctx *vmstore.VMContext, addr *types.Address) ([]string, error)
- func GetPreStopNames(ctx *vmstore.VMContext, addr *types.Address) ([]string, error)
- func SLATypeNames() []string
- func SaveAssetParam(ctx *vmstore.VMContext, bts []byte) error
- func SaveCDRStatus(ctx *vmstore.VMContext, addr *types.Address, hash *types.Hash, ...) error
- func SaveContractParam(ctx *vmstore.VMContext, addr *types.Address, bts []byte) error
- func SendingStatusNames() []string
- func SettlementStatusNames() []string
- type ABIer
- type Asset
- func (z *Asset) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *Asset) EncodeMsg(en *msgp.Writer) (err error)
- func (z *Asset) MarshalMsg(b []byte) (o []byte, err error)
- func (z *Asset) Msgsize() (s int)
- func (z *Asset) String() string
- func (z *Asset) ToAssertID() (types.Hash, error)
- func (z *Asset) UnmarshalMsg(bts []byte) (o []byte, err error)
- type AssetParam
- func (z *AssetParam) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *AssetParam) EncodeMsg(en *msgp.Writer) (err error)
- func (z *AssetParam) FromABI(data []byte) error
- func (z *AssetParam) MarshalMsg(b []byte) (o []byte, err error)
- func (z *AssetParam) Msgsize() (s int)
- func (z *AssetParam) String() string
- func (z *AssetParam) ToABI() ([]byte, error)
- func (z *AssetParam) ToAddress() (types.Address, error)
- func (z *AssetParam) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (z *AssetParam) Verify() error
- type AssetStatus
- func (z *AssetStatus) DecodeMsg(dc *msgp.Reader) (err error)
- func (z AssetStatus) EncodeMsg(en *msgp.Writer) (err error)
- func (z AssetStatus) MarshalMsg(b []byte) (o []byte, err error)
- func (x AssetStatus) MarshalText() ([]byte, error)
- func (z AssetStatus) Msgsize() (s int)
- func (x AssetStatus) String() string
- func (z *AssetStatus) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (x *AssetStatus) UnmarshalText(text []byte) error
- type CDRParam
- func (z *CDRParam) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *CDRParam) EncodeMsg(en *msgp.Writer) (err error)
- func (z *CDRParam) GetCustomer() string
- func (z *CDRParam) MarshalMsg(b []byte) (o []byte, err error)
- func (z *CDRParam) Msgsize() (s int)
- func (z *CDRParam) Status() bool
- func (z *CDRParam) String() string
- func (z *CDRParam) ToHash() (types.Hash, error)
- func (z *CDRParam) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (z *CDRParam) Verify() error
- type CDRParamList
- func (z *CDRParamList) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *CDRParamList) EncodeMsg(en *msgp.Writer) (err error)
- func (z *CDRParamList) FromABI(data []byte) error
- func (z *CDRParamList) MarshalMsg(b []byte) (o []byte, err error)
- func (z *CDRParamList) Msgsize() (s int)
- func (z *CDRParamList) ToABI() ([]byte, error)
- func (z *CDRParamList) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (z *CDRParamList) Verify() error
- type CDRStatus
- func GetAllCDRStatus(store ledger.Store, addr *types.Address) ([]*CDRStatus, error)
- func GetCDRStatus(ctx *vmstore.VMContext, addr *types.Address, hash types.Hash) (*CDRStatus, error)
- func GetCDRStatusByDate(store ledger.Store, addr *types.Address, start, end int64) ([]*CDRStatus, error)
- func ParseCDRStatus(v []byte) (*CDRStatus, error)
- func (z *CDRStatus) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *CDRStatus) DoSettlement(cdr SettlementCDR) (err error)
- func (z *CDRStatus) EncodeMsg(en *msgp.Writer) (err error)
- func (z *CDRStatus) ExtractAccount() (dt int64, account, destination string, err error)
- func (z *CDRStatus) ExtractCustomer() (dt int64, customer, destination string, err error)
- func (z *CDRStatus) ExtractID() (dt int64, sender, destination string, err error)
- func (z *CDRStatus) FromABI(data []byte) error
- func (z *CDRStatus) IsInCycle(start, end int64) bool
- func (z *CDRStatus) IsMatching(addrs []*types.Address) bool
- func (z *CDRStatus) MarshalMsg(b []byte) (o []byte, err error)
- func (z *CDRStatus) Merge(other *CDRStatus) *CDRStatus
- func (z *CDRStatus) Msgsize() (s int)
- func (z *CDRStatus) State(addr *types.Address, fn func(status *CDRStatus) (string, error)) (sender string, state bool, err error)
- func (z *CDRStatus) String() string
- func (z *CDRStatus) ToABI() ([]byte, error)
- func (z *CDRStatus) ToHash() (types.Hash, error)
- func (z *CDRStatus) UnmarshalMsg(bts []byte) (o []byte, err error)
- type CompareRecord
- type Compensation
- type ContractAddressList
- func (z *ContractAddressList) Append(address *types.Address) bool
- func (z *ContractAddressList) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *ContractAddressList) EncodeMsg(en *msgp.Writer) (err error)
- func (z *ContractAddressList) FromABI(data []byte) error
- func (z *ContractAddressList) MarshalMsg(b []byte) (o []byte, err error)
- func (z *ContractAddressList) Msgsize() (s int)
- func (z *ContractAddressList) String() string
- func (z *ContractAddressList) ToABI() ([]byte, error)
- func (z *ContractAddressList) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ContractParam
- func FindSettlementContract(store ledger.Store, addr *types.Address, param *CDRParam) (*ContractParam, error)
- func GetAllSettlementContract(store ledger.Store) ([]*ContractParam, error)
- func GetContractsByAddress(store ledger.Store, addr *types.Address) ([]*ContractParam, error)
- func GetContractsByStatus(store ledger.Store, addr *types.Address, status ContractStatus) ([]*ContractParam, error)
- func GetContractsIDByAddressAsPartyA(store ledger.Store, addr *types.Address) ([]*ContractParam, error)
- func GetContractsIDByAddressAsPartyB(store ledger.Store, addr *types.Address) ([]*ContractParam, error)
- func GetExpiredContracts(store ledger.Store, addr *types.Address) ([]*ContractParam, error)
- func GetSettlementContract(ctx *vmstore.VMContext, addr *types.Address) (*ContractParam, error)
- func ParseContractParam(v []byte) (*ContractParam, error)
- func (z *ContractParam) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *ContractParam) DoActive(operator types.Address) error
- func (z *ContractParam) DoTerminate(operator *Terminator) error
- func (z *ContractParam) EncodeMsg(en *msgp.Writer) (err error)
- func (z *ContractParam) Equal(cp *CreateContractParam) (bool, error)
- func (z *ContractParam) FromABI(data []byte) error
- func (z *ContractParam) IsAvailable() bool
- func (z *ContractParam) IsContractor(addr types.Address) bool
- func (z *ContractParam) IsExpired() bool
- func (z *ContractParam) IsNextStop(n string) bool
- func (z *ContractParam) IsPreStop(n string) bool
- func (z *ContractParam) MarshalMsg(b []byte) (o []byte, err error)
- func (z *ContractParam) Msgsize() (s int)
- func (z *ContractParam) String() string
- func (z *ContractParam) ToABI() ([]byte, error)
- func (z *ContractParam) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ContractService
- func (z *ContractService) Balance() (types.Balance, error)
- func (z *ContractService) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *ContractService) EncodeMsg(en *msgp.Writer) (err error)
- func (z *ContractService) FromABI(data []byte) error
- func (z *ContractService) MarshalMsg(b []byte) (o []byte, err error)
- func (z *ContractService) Msgsize() (s int)
- func (z *ContractService) ToABI() ([]byte, error)
- func (z *ContractService) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ContractStatus
- func (z *ContractStatus) DecodeMsg(dc *msgp.Reader) (err error)
- func (z ContractStatus) EncodeMsg(en *msgp.Writer) (err error)
- func (z ContractStatus) MarshalMsg(b []byte) (o []byte, err error)
- func (x ContractStatus) MarshalText() ([]byte, error)
- func (z ContractStatus) Msgsize() (s int)
- func (x ContractStatus) String() string
- func (z *ContractStatus) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (x *ContractStatus) UnmarshalText(text []byte) error
- type Contractor
- func (z *Contractor) DecodeMsg(dc *msgp.Reader) (err error)
- func (z Contractor) EncodeMsg(en *msgp.Writer) (err error)
- func (z *Contractor) FromABI(data []byte) error
- func (z Contractor) MarshalMsg(b []byte) (o []byte, err error)
- func (z Contractor) Msgsize() (s int)
- func (z *Contractor) String() string
- func (z *Contractor) ToABI() ([]byte, error)
- func (z *Contractor) UnmarshalMsg(bts []byte) (o []byte, err error)
- type CreateContractParam
- func (z *CreateContractParam) Address() (types.Address, error)
- func (z *CreateContractParam) Balance() (types.Balance, error)
- func (z *CreateContractParam) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *CreateContractParam) EncodeMsg(en *msgp.Writer) (err error)
- func (z *CreateContractParam) FromABI(data []byte) error
- func (z *CreateContractParam) MarshalMsg(b []byte) (o []byte, err error)
- func (z *CreateContractParam) Msgsize() (s int)
- func (z *CreateContractParam) String() string
- func (z *CreateContractParam) ToABI() ([]byte, error)
- func (z *CreateContractParam) ToContractParam() *ContractParam
- func (z *CreateContractParam) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (z *CreateContractParam) Verify() (bool, error)
- type DLRStatus
- func (z *DLRStatus) DecodeMsg(dc *msgp.Reader) (err error)
- func (z DLRStatus) EncodeMsg(en *msgp.Writer) (err error)
- func (z DLRStatus) MarshalMsg(b []byte) (o []byte, err error)
- func (x DLRStatus) MarshalText() ([]byte, error)
- func (z DLRStatus) Msgsize() (s int)
- func (x DLRStatus) String() string
- func (z *DLRStatus) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (x *DLRStatus) UnmarshalText(text []byte) error
- type InvoiceRecord
- func GenerateInvoices(store ledger.Store, addr *types.Address, start, end int64) ([]*InvoiceRecord, error)
- func GenerateInvoicesByAccount(store ledger.Store, addr *types.Address, account string, start, end int64) ([]*InvoiceRecord, error)
- func GenerateInvoicesByContract(store ledger.Store, addr *types.Address, start, end int64) ([]*InvoiceRecord, error)
- func GenerateInvoicesByCustomer(store ledger.Store, addr *types.Address, customer string, start, end int64) ([]*InvoiceRecord, error)
- func GenerateMultiPartyInvoice(store ledger.Store, firstAddr, secondAddr *types.Address, start, end int64) ([]*InvoiceRecord, error)
- type MatchingRecord
- type MultiPartySummaryResult
- type SLA
- func (z *SLA) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *SLA) Deserialize(bts []byte) error
- func (z *SLA) EncodeMsg(en *msgp.Writer) (err error)
- func (z *SLA) MarshalMsg(b []byte) (o []byte, err error)
- func (z *SLA) Msgsize() (s int)
- func (z *SLA) Serialize() ([]byte, error)
- func (z *SLA) String() string
- func (z *SLA) UnmarshalMsg(bts []byte) (o []byte, err error)
- type SLAType
- func (z *SLAType) DecodeMsg(dc *msgp.Reader) (err error)
- func (z SLAType) EncodeMsg(en *msgp.Writer) (err error)
- func (z SLAType) MarshalMsg(b []byte) (o []byte, err error)
- func (x SLAType) MarshalText() ([]byte, error)
- func (z SLAType) Msgsize() (s int)
- func (x SLAType) String() string
- func (z *SLAType) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (x *SLAType) UnmarshalText(text []byte) error
- type SendingStatus
- func (z *SendingStatus) DecodeMsg(dc *msgp.Reader) (err error)
- func (z SendingStatus) EncodeMsg(en *msgp.Writer) (err error)
- func (z SendingStatus) MarshalMsg(b []byte) (o []byte, err error)
- func (x SendingStatus) MarshalText() ([]byte, error)
- func (z SendingStatus) Msgsize() (s int)
- func (x SendingStatus) String() string
- func (z *SendingStatus) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (x *SendingStatus) UnmarshalText(text []byte) error
- type SettlementCDR
- func (z *SettlementCDR) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *SettlementCDR) EncodeMsg(en *msgp.Writer) (err error)
- func (z *SettlementCDR) MarshalMsg(b []byte) (o []byte, err error)
- func (z *SettlementCDR) Msgsize() (s int)
- func (z *SettlementCDR) UnmarshalMsg(bts []byte) (o []byte, err error)
- type SettlementStatus
- func (z *SettlementStatus) DecodeMsg(dc *msgp.Reader) (err error)
- func (z SettlementStatus) EncodeMsg(en *msgp.Writer) (err error)
- func (z SettlementStatus) MarshalMsg(b []byte) (o []byte, err error)
- func (x SettlementStatus) MarshalText() ([]byte, error)
- func (z SettlementStatus) Msgsize() (s int)
- func (x SettlementStatus) String() string
- func (z *SettlementStatus) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (x *SettlementStatus) UnmarshalText(text []byte) error
- type SignContractParam
- func (z *SignContractParam) DecodeMsg(dc *msgp.Reader) (err error)
- func (z SignContractParam) EncodeMsg(en *msgp.Writer) (err error)
- func (z *SignContractParam) FromABI(data []byte) error
- func (z SignContractParam) MarshalMsg(b []byte) (o []byte, err error)
- func (z SignContractParam) Msgsize() (s int)
- func (z *SignContractParam) ToABI() ([]byte, error)
- func (z *SignContractParam) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (z *SignContractParam) Verify() (bool, error)
- type StopParam
- func (z *StopParam) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *StopParam) EncodeMsg(en *msgp.Writer) (err error)
- func (z *StopParam) FromABI(methodName string, data []byte) error
- func (z *StopParam) MarshalMsg(b []byte) (o []byte, err error)
- func (z *StopParam) Msgsize() (s int)
- func (z *StopParam) ToABI(methodName string) ([]byte, error)
- func (z *StopParam) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (z *StopParam) Verify() error
- type SummaryRecord
- type SummaryResult
- func GetSummaryReport(store ledger.Store, addr *types.Address, start, end int64) (*SummaryResult, error)
- func GetSummaryReportByAccount(store ledger.Store, addr *types.Address, account string, start, end int64) (*SummaryResult, error)
- func GetSummaryReportByCustomer(store ledger.Store, addr *types.Address, customer string, start, end int64) (*SummaryResult, error)
- type TerminateParam
- func (z *TerminateParam) DecodeMsg(dc *msgp.Reader) (err error)
- func (z TerminateParam) EncodeMsg(en *msgp.Writer) (err error)
- func (z *TerminateParam) FromABI(data []byte) error
- func (z TerminateParam) MarshalMsg(b []byte) (o []byte, err error)
- func (z TerminateParam) Msgsize() (s int)
- func (z *TerminateParam) String() string
- func (z *TerminateParam) ToABI() ([]byte, error)
- func (z *TerminateParam) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (z *TerminateParam) Verify() error
- type Terminator
- func (z *Terminator) DecodeMsg(dc *msgp.Reader) (err error)
- func (z Terminator) EncodeMsg(en *msgp.Writer) (err error)
- func (z Terminator) MarshalMsg(b []byte) (o []byte, err error)
- func (z Terminator) Msgsize() (s int)
- func (z *Terminator) String() string
- func (z *Terminator) UnmarshalMsg(bts []byte) (o []byte, err error)
- type UpdateStopParam
- func (z *UpdateStopParam) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *UpdateStopParam) EncodeMsg(en *msgp.Writer) (err error)
- func (z *UpdateStopParam) FromABI(methodName string, data []byte) error
- func (z *UpdateStopParam) MarshalMsg(b []byte) (o []byte, err error)
- func (z *UpdateStopParam) Msgsize() (s int)
- func (z *UpdateStopParam) ToABI(methodName string) ([]byte, error)
- func (z *UpdateStopParam) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (z *UpdateStopParam) Verify() error
- type Verifier
Constants ¶
const ( JsonSettlement = `` /* 2885-byte string literal not displayed */ MethodNameCreateContract = "CreateContract" MethodNameSignContract = "SignContract" MethodNameTerminateContract = "TerminateContract" MethodNameProcessCDR = "ProcessCDR" MethodNameAddPreStop = "AddPreStop" MethodNameRemovePreStop = "RemovePreStop" MethodNameUpdatePreStop = "UpdatePreStop" MethodNameAddNextStop = "AddNextStop" MethodNameRemoveNextStop = "RemoveNextStop" MethodNameUpdateNextStop = "UpdateNextStop" MethodNameRegisterAsset = "RegisterAsset" )
const ( ContractFlag byte = iota AssetFlag AddressMappingFlag )
Variables ¶
var (
SettlementABI, _ = abi.JSONToABIContract(strings.NewReader(JsonSettlement))
)
Functions ¶
func AssetStatusNames ¶
func AssetStatusNames() []string
AssetStatusNames returns a list of possible string values of AssetStatus.
func ContractStatusNames ¶
func ContractStatusNames() []string
ContractStatusNames returns a list of possible string values of ContractStatus.
func DLRStatusNames ¶
func DLRStatusNames() []string
DLRStatusNames returns a list of possible string values of DLRStatus.
func GetCDRMapping ¶
func GetContractParam ¶
func GetMultiPartyCDRStatus ¶
func GetMultiPartyCDRStatus(store ledger.Store, firstAddr, secondAddr *types.Address) (map[types.Address][]*CDRStatus, error)
GetMultiPartyCDRStatus get all CDR records belong to firstAddr and secondAddr
func GetNextStopNames ¶
func GetPreStopNames ¶
func SLATypeNames ¶
func SLATypeNames() []string
SLATypeNames returns a list of possible string values of SLAType.
func SaveCDRStatus ¶
func SaveContractParam ¶
func SendingStatusNames ¶
func SendingStatusNames() []string
SendingStatusNames returns a list of possible string values of SendingStatus.
func SettlementStatusNames ¶
func SettlementStatusNames() []string
SettlementStatusNames returns a list of possible string values of SettlementStatus.
Types ¶
type Asset ¶
type Asset struct { Mcc uint64 `msg:"mcc" json:"mcc"` Mnc uint64 `msg:"mnc" json:"mnc"` TotalAmount uint64 `msg:"t" json:"totalAmount" validate:"min=1"` SLAs []*SLA `msg:"s" json:"sla,omitempty"` }
func (*Asset) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type AssetParam ¶
type AssetParam struct { Owner Contractor `msg:"o" json:"owner"` Previous types.Hash `msg:"pre,extension" json:"-" validate:"hash"` Assets []*Asset `msg:"a" json:"assets" validate:"nonzero"` SignDate int64 `msg:"t1" json:"signDate" validate:"min=1"` StartDate int64 `msg:"t3" json:"startDate" validate:"min=1"` EndDate int64 `msg:"t4" json:"endDate" validate:"min=1"` Status AssetStatus `msg:"s" json:"status"` }
func GetAllAsserts ¶
func GetAllAsserts(store ledger.Store) ([]*AssetParam, error)
func GetAssertsByAddress ¶
func GetAssetParam ¶
func ParseAssertParam ¶
func ParseAssertParam(bts []byte) (*AssetParam, error)
func (*AssetParam) DecodeMsg ¶
func (z *AssetParam) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*AssetParam) EncodeMsg ¶
func (z *AssetParam) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*AssetParam) FromABI ¶
func (z *AssetParam) FromABI(data []byte) error
func (*AssetParam) MarshalMsg ¶
func (z *AssetParam) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*AssetParam) Msgsize ¶
func (z *AssetParam) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*AssetParam) String ¶
func (z *AssetParam) String() string
func (*AssetParam) ToABI ¶
func (z *AssetParam) ToABI() ([]byte, error)
func (*AssetParam) UnmarshalMsg ¶
func (z *AssetParam) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
func (*AssetParam) Verify ¶
func (z *AssetParam) Verify() error
type AssetStatus ¶
type AssetStatus int
ENUM( Deactivated Activated )
const ( // AssetStatusDeactivated is a AssetStatus of type Deactivated AssetStatusDeactivated AssetStatus = iota // AssetStatusActivated is a AssetStatus of type Activated AssetStatusActivated )
func ParseAssetStatus ¶
func ParseAssetStatus(name string) (AssetStatus, error)
ParseAssetStatus attempts to convert a string to a AssetStatus
func (*AssetStatus) DecodeMsg ¶
func (z *AssetStatus) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (AssetStatus) EncodeMsg ¶
func (z AssetStatus) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (AssetStatus) MarshalMsg ¶
func (z AssetStatus) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (AssetStatus) MarshalText ¶
func (x AssetStatus) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method
func (AssetStatus) Msgsize ¶
func (z AssetStatus) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (AssetStatus) String ¶
func (x AssetStatus) String() string
String implements the Stringer interface.
func (*AssetStatus) UnmarshalMsg ¶
func (z *AssetStatus) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
func (*AssetStatus) UnmarshalText ¶
func (x *AssetStatus) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method
type CDRParam ¶
type CDRParam struct { Index uint64 `msg:"i" json:"index" validate:"min=1"` SmsDt int64 `msg:"dt" json:"smsDt" validate:"min=1"` Account string `msg:"ac" json:"account"` Sender string `msg:"tx" json:"sender" validate:"nonzero"` Customer string `msg:"c" json:"customer"` Destination string `msg:"d" json:"destination" validate:"nonzero"` SendingStatus SendingStatus `msg:"s" json:"sendingStatus"` DlrStatus DLRStatus `msg:"ds" json:"dlrStatus"` PreStop string `msg:"ps" json:"preStop"` NextStop string `msg:"ns" json:"nextStop"` }
func (*CDRParam) GetCustomer ¶
func (*CDRParam) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*CDRParam) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*CDRParam) UnmarshalMsg ¶
UnmarshalMsg implements msgp.Unmarshaler
type CDRParamList ¶
type CDRParamList struct { ContractAddress types.Address `msg:"a" json:"contractAddress" validate:"qlcaddress"` Params []*CDRParam `msg:"p" json:"params" validate:"min=1"` }
func (*CDRParamList) DecodeMsg ¶
func (z *CDRParamList) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*CDRParamList) EncodeMsg ¶
func (z *CDRParamList) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*CDRParamList) FromABI ¶
func (z *CDRParamList) FromABI(data []byte) error
func (*CDRParamList) MarshalMsg ¶
func (z *CDRParamList) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*CDRParamList) Msgsize ¶
func (z *CDRParamList) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*CDRParamList) ToABI ¶
func (z *CDRParamList) ToABI() ([]byte, error)
func (*CDRParamList) UnmarshalMsg ¶
func (z *CDRParamList) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
func (*CDRParamList) Verify ¶
func (z *CDRParamList) Verify() error
type CDRStatus ¶
type CDRStatus struct { Params map[string][]CDRParam `msg:"p" json:"params"` Status SettlementStatus `msg:"s" json:"status"` }
func GetAllCDRStatus ¶
GetAllCDRStatus get all CDR records of the specific settlement contract @param addr settlement smart contract
func GetCDRStatus ¶
GetCDRStatus @param addr settlement contract address @param CDR data hash
func GetCDRStatusByDate ¶
func GetCDRStatusByDate(store ledger.Store, addr *types.Address, start, end int64) ([]*CDRStatus, error)
GetCDRStatusByDate
func ParseCDRStatus ¶
func (*CDRStatus) DoSettlement ¶
func (z *CDRStatus) DoSettlement(cdr SettlementCDR) (err error)
DoSettlement process settlement @param cdr cdr data
func (*CDRStatus) ExtractAccount ¶
func (*CDRStatus) ExtractCustomer ¶
func (*CDRStatus) ExtractID ¶
ExtractID fetch SMS sender/destination/datetime, if `Customer` is not empty, use it instead of sender
func (*CDRStatus) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*CDRStatus) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
type CompareRecord ¶
type CompareRecord struct {
// contains filtered or unexported fields
}
func (*CompareRecord) DoCalculate ¶
func (z *CompareRecord) DoCalculate()
func (*CompareRecord) MarshalJSON ¶
func (z *CompareRecord) MarshalJSON() ([]byte, error)
func (*CompareRecord) UpdateCounter ¶
func (z *CompareRecord) UpdateCounter(party string, isMatching, state bool)
type Compensation ¶
type Compensation struct { Low float32 `msg:"l" json:"low"` High float32 `msg:"h" json:"high"` Rate float32 `msg:"r" json:"rate"` }
func (*Compensation) DecodeMsg ¶
func (z *Compensation) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (Compensation) EncodeMsg ¶
func (z Compensation) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (Compensation) MarshalMsg ¶
func (z Compensation) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (Compensation) Msgsize ¶
func (z Compensation) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*Compensation) UnmarshalMsg ¶
func (z *Compensation) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ContractAddressList ¶
func (*ContractAddressList) Append ¶
func (z *ContractAddressList) Append(address *types.Address) bool
func (*ContractAddressList) DecodeMsg ¶
func (z *ContractAddressList) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ContractAddressList) EncodeMsg ¶
func (z *ContractAddressList) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ContractAddressList) FromABI ¶
func (z *ContractAddressList) FromABI(data []byte) error
func (*ContractAddressList) MarshalMsg ¶
func (z *ContractAddressList) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ContractAddressList) Msgsize ¶
func (z *ContractAddressList) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ContractAddressList) String ¶
func (z *ContractAddressList) String() string
func (*ContractAddressList) ToABI ¶
func (z *ContractAddressList) ToABI() ([]byte, error)
func (*ContractAddressList) UnmarshalMsg ¶
func (z *ContractAddressList) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ContractParam ¶
type ContractParam struct { CreateContractParam PreStops []string `msg:"pre" json:"preStops,omitempty"` NextStops []string `msg:"nex" json:"nextStops,omitempty"` ConfirmDate int64 `msg:"t2" json:"confirmDate"` Status ContractStatus `msg:"s" json:"status"` Terminator *Terminator `msg:"t" json:"terminator,omitempty"` }
func FindSettlementContract ¶
func FindSettlementContract(store ledger.Store, addr *types.Address, param *CDRParam) (*ContractParam, error)
FindSettlementContract query settlement contract by user address and CDR data
func GetAllSettlementContract ¶
func GetAllSettlementContract(store ledger.Store) ([]*ContractParam, error)
func GetContractsByAddress ¶
GetContractsByAddress get all contract data by address both Party A and Party B
func GetContractsByStatus ¶
func GetContractsByStatus(store ledger.Store, addr *types.Address, status ContractStatus) ([]*ContractParam, error)
GetContractsByStatus get all contract data by address both Party A and Party B
func GetContractsIDByAddressAsPartyA ¶
func GetContractsIDByAddressAsPartyA(store ledger.Store, addr *types.Address) ([]*ContractParam, error)
GetContractsIDByAddressAsPartyA get all contracts ID as Party A
func GetContractsIDByAddressAsPartyB ¶
func GetContractsIDByAddressAsPartyB(store ledger.Store, addr *types.Address) ([]*ContractParam, error)
GetContractsIDByAddressAsPartyB get all contracts ID as Party B
func GetExpiredContracts ¶
GetContractsByStatus get all expired contract data by address both Party A and Party B
func GetSettlementContract ¶
GetSettlementContract @param addr smart contract address
func ParseContractParam ¶
func ParseContractParam(v []byte) (*ContractParam, error)
func (*ContractParam) DecodeMsg ¶
func (z *ContractParam) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ContractParam) DoTerminate ¶
func (z *ContractParam) DoTerminate(operator *Terminator) error
func (*ContractParam) EncodeMsg ¶
func (z *ContractParam) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ContractParam) Equal ¶
func (z *ContractParam) Equal(cp *CreateContractParam) (bool, error)
func (*ContractParam) FromABI ¶
func (z *ContractParam) FromABI(data []byte) error
func (*ContractParam) IsAvailable ¶
func (z *ContractParam) IsAvailable() bool
func (*ContractParam) IsContractor ¶
func (z *ContractParam) IsContractor(addr types.Address) bool
func (*ContractParam) IsExpired ¶
func (z *ContractParam) IsExpired() bool
func (*ContractParam) IsNextStop ¶
func (z *ContractParam) IsNextStop(n string) bool
func (*ContractParam) IsPreStop ¶
func (z *ContractParam) IsPreStop(n string) bool
func (*ContractParam) MarshalMsg ¶
func (z *ContractParam) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ContractParam) Msgsize ¶
func (z *ContractParam) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ContractParam) String ¶
func (z *ContractParam) String() string
func (*ContractParam) ToABI ¶
func (z *ContractParam) ToABI() ([]byte, error)
func (*ContractParam) UnmarshalMsg ¶
func (z *ContractParam) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ContractService ¶
type ContractService struct { ServiceId string `msg:"id" json:"serviceId" validate:"nonzero"` Mcc uint64 `msg:"mcc" json:"mcc"` Mnc uint64 `msg:"mnc" json:"mnc"` TotalAmount uint64 `msg:"t" json:"totalAmount" validate:"min=1"` UnitPrice float64 `msg:"u" json:"unitPrice" validate:"nonzero"` Currency string `msg:"c" json:"currency" validate:"nonzero"` }
func (*ContractService) DecodeMsg ¶
func (z *ContractService) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ContractService) EncodeMsg ¶
func (z *ContractService) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ContractService) FromABI ¶
func (z *ContractService) FromABI(data []byte) error
func (*ContractService) MarshalMsg ¶
func (z *ContractService) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ContractService) Msgsize ¶
func (z *ContractService) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ContractService) ToABI ¶
func (z *ContractService) ToABI() ([]byte, error)
func (*ContractService) UnmarshalMsg ¶
func (z *ContractService) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ContractStatus ¶
type ContractStatus int
ENUM( ActiveStage1 Activated DestroyStage1 Destroyed Rejected )
const ( // ContractStatusActiveStage1 is a ContractStatus of type ActiveStage1 ContractStatusActiveStage1 ContractStatus = iota // ContractStatusActivated is a ContractStatus of type Activated ContractStatusActivated // ContractStatusDestroyStage1 is a ContractStatus of type DestroyStage1 ContractStatusDestroyStage1 // ContractStatusDestroyed is a ContractStatus of type Destroyed ContractStatusDestroyed // ContractStatusRejected is a ContractStatus of type Rejected ContractStatusRejected )
func ParseContractStatus ¶
func ParseContractStatus(name string) (ContractStatus, error)
ParseContractStatus attempts to convert a string to a ContractStatus
func (*ContractStatus) DecodeMsg ¶
func (z *ContractStatus) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (ContractStatus) EncodeMsg ¶
func (z ContractStatus) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (ContractStatus) MarshalMsg ¶
func (z ContractStatus) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (ContractStatus) MarshalText ¶
func (x ContractStatus) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method
func (ContractStatus) Msgsize ¶
func (z ContractStatus) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (ContractStatus) String ¶
func (x ContractStatus) String() string
String implements the Stringer interface.
func (*ContractStatus) UnmarshalMsg ¶
func (z *ContractStatus) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
func (*ContractStatus) UnmarshalText ¶
func (x *ContractStatus) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method
type Contractor ¶
type Contractor struct { Address types.Address `msg:"a,extension" json:"address" validate:"qlcaddress"` Name string `msg:"n" json:"name" validate:"nonzero"` }
func (*Contractor) DecodeMsg ¶
func (z *Contractor) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (Contractor) EncodeMsg ¶
func (z Contractor) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*Contractor) FromABI ¶
func (z *Contractor) FromABI(data []byte) error
func (Contractor) MarshalMsg ¶
func (z Contractor) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (Contractor) Msgsize ¶
func (z Contractor) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*Contractor) String ¶
func (z *Contractor) String() string
func (*Contractor) ToABI ¶
func (z *Contractor) ToABI() ([]byte, error)
func (*Contractor) UnmarshalMsg ¶
func (z *Contractor) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type CreateContractParam ¶
type CreateContractParam struct { PartyA Contractor `msg:"pa" json:"partyA"` PartyB Contractor `msg:"pb" json:"partyB"` Previous types.Hash `msg:"pre,extension" json:"-"` Services []ContractService `msg:"s" json:"services"` SignDate int64 `msg:"t1" json:"signDate"` StartDate int64 `msg:"t3" json:"startDate"` EndDate int64 `msg:"t4" json:"endDate"` }
func (*CreateContractParam) Address ¶
func (z *CreateContractParam) Address() (types.Address, error)
func (*CreateContractParam) Balance ¶
func (z *CreateContractParam) Balance() (types.Balance, error)
func (*CreateContractParam) DecodeMsg ¶
func (z *CreateContractParam) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*CreateContractParam) EncodeMsg ¶
func (z *CreateContractParam) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*CreateContractParam) FromABI ¶
func (z *CreateContractParam) FromABI(data []byte) error
func (*CreateContractParam) MarshalMsg ¶
func (z *CreateContractParam) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*CreateContractParam) Msgsize ¶
func (z *CreateContractParam) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*CreateContractParam) String ¶
func (z *CreateContractParam) String() string
func (*CreateContractParam) ToABI ¶
func (z *CreateContractParam) ToABI() ([]byte, error)
func (*CreateContractParam) ToContractParam ¶
func (z *CreateContractParam) ToContractParam() *ContractParam
func (*CreateContractParam) UnmarshalMsg ¶
func (z *CreateContractParam) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
func (*CreateContractParam) Verify ¶
func (z *CreateContractParam) Verify() (bool, error)
type DLRStatus ¶
type DLRStatus int
ENUM( Delivered Rejected Unknown Undelivered Empty )
const ( // DLRStatusDelivered is a DLRStatus of type Delivered DLRStatusDelivered DLRStatus = iota // DLRStatusRejected is a DLRStatus of type Rejected DLRStatusRejected // DLRStatusUnknown is a DLRStatus of type Unknown DLRStatusUnknown // DLRStatusUndelivered is a DLRStatus of type Undelivered DLRStatusUndelivered // DLRStatusEmpty is a DLRStatus of type Empty DLRStatusEmpty )
func ParseDLRStatus ¶
ParseDLRStatus attempts to convert a string to a DLRStatus
func (DLRStatus) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (DLRStatus) MarshalText ¶
MarshalText implements the text marshaller method
func (DLRStatus) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*DLRStatus) UnmarshalMsg ¶
UnmarshalMsg implements msgp.Unmarshaler
func (*DLRStatus) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method
type InvoiceRecord ¶
type InvoiceRecord struct { Address types.Address `json:"contractAddress"` StartDate int64 `json:"startDate"` EndDate int64 `json:"endDate"` Customer string `json:"customer"` CustomerSr string `json:"customerSr"` Country string `json:"country"` Operator string `json:"operator"` ServiceId string `json:"serviceId"` MCC uint64 `json:"mcc"` MNC uint64 `json:"mnc"` Currency string `json:"currency"` UnitPrice float64 `json:"unitPrice"` SumOfBillableSMSCustomer uint64 `json:"sumOfBillableSMSCustomer"` SumOfTOTPrice float64 `json:"sumOfTOTPrice"` }
func GenerateInvoices ¶
func GenerateInvoices(store ledger.Store, addr *types.Address, start, end int64) ([]*InvoiceRecord, error)
GenerateInvoices @param addr user qlcchain address
func GenerateInvoicesByContract ¶
func GenerateInvoicesByContract(store ledger.Store, addr *types.Address, start, end int64) ([]*InvoiceRecord, error)
GenerateInvoicesByContract addr settlement contract address
func GenerateMultiPartyInvoice ¶
func GenerateMultiPartyInvoice(store ledger.Store, firstAddr, secondAddr *types.Address, start, end int64) ([]*InvoiceRecord, error)
GenerateMultiPartyInvoice addr settlement contract address
type MatchingRecord ¶
type MatchingRecord struct { Orphan SummaryRecord `json:"orphan"` Matching SummaryRecord `json:"matching"` }
type MultiPartySummaryResult ¶
type MultiPartySummaryResult struct { Contracts []*ContractParam `json:"contracts"` Records map[string]*CompareRecord `json:"records"` Total *CompareRecord `json:"total"` }
func GetMultiPartySummaryReport ¶
func GetMultiPartySummaryReport(store ledger.Store, firstAddr, secondAddr *types.Address, start, end int64) (*MultiPartySummaryResult, error)
GetMultiPartySummaryReport
func (*MultiPartySummaryResult) DoCalculate ¶
func (z *MultiPartySummaryResult) DoCalculate()
func (*MultiPartySummaryResult) String ¶
func (z *MultiPartySummaryResult) String() string
func (*MultiPartySummaryResult) UpdateState ¶
func (z *MultiPartySummaryResult) UpdateState(sender, party string, isMatching, state bool)
type SLA ¶
type SLA struct { SLAType SLAType `msg:"t" json:"type"` Priority uint `msg:"p" json:"priority"` Value float32 `msg:"v" json:"value"` Compensations []*Compensation `msg:"c" json:"compensations,omitempty"` }
func NewDeliveredRate ¶
func NewDeliveredRate(rate float32, c []*Compensation) *SLA
func NewLatency ¶
func NewLatency(latency time.Duration, c []*Compensation) *SLA
func (*SLA) Deserialize ¶
func (*SLA) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type SLAType ¶
type SLAType int
ENUM( DeliveredRate Latency )
func ParseSLAType ¶
ParseSLAType attempts to convert a string to a SLAType
func (SLAType) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (SLAType) MarshalText ¶
MarshalText implements the text marshaller method
func (SLAType) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*SLAType) UnmarshalMsg ¶
UnmarshalMsg implements msgp.Unmarshaler
func (*SLAType) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method
type SendingStatus ¶
type SendingStatus int
ENUM( Sent Error Empty )
const ( // SendingStatusSent is a SendingStatus of type Sent SendingStatusSent SendingStatus = iota // SendingStatusError is a SendingStatus of type Error SendingStatusError // SendingStatusEmpty is a SendingStatus of type Empty SendingStatusEmpty )
func ParseSendingStatus ¶
func ParseSendingStatus(name string) (SendingStatus, error)
ParseSendingStatus attempts to convert a string to a SendingStatus
func (*SendingStatus) DecodeMsg ¶
func (z *SendingStatus) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (SendingStatus) EncodeMsg ¶
func (z SendingStatus) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (SendingStatus) MarshalMsg ¶
func (z SendingStatus) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (SendingStatus) MarshalText ¶
func (x SendingStatus) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method
func (SendingStatus) Msgsize ¶
func (z SendingStatus) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (SendingStatus) String ¶
func (x SendingStatus) String() string
String implements the Stringer interface.
func (*SendingStatus) UnmarshalMsg ¶
func (z *SendingStatus) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
func (*SendingStatus) UnmarshalText ¶
func (x *SendingStatus) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method
type SettlementCDR ¶
func (*SettlementCDR) DecodeMsg ¶
func (z *SettlementCDR) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*SettlementCDR) EncodeMsg ¶
func (z *SettlementCDR) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*SettlementCDR) MarshalMsg ¶
func (z *SettlementCDR) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*SettlementCDR) Msgsize ¶
func (z *SettlementCDR) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*SettlementCDR) UnmarshalMsg ¶
func (z *SettlementCDR) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type SettlementStatus ¶
type SettlementStatus int
ENUM( unknown stage1 success failure missing duplicate )
const ( // SettlementStatusUnknown is a SettlementStatus of type Unknown SettlementStatusUnknown SettlementStatus = iota // SettlementStatusStage1 is a SettlementStatus of type Stage1 SettlementStatusStage1 // SettlementStatusSuccess is a SettlementStatus of type Success SettlementStatusSuccess // SettlementStatusFailure is a SettlementStatus of type Failure SettlementStatusFailure // SettlementStatusMissing is a SettlementStatus of type Missing SettlementStatusMissing // SettlementStatusDuplicate is a SettlementStatus of type Duplicate SettlementStatusDuplicate )
func ParseSettlementStatus ¶
func ParseSettlementStatus(name string) (SettlementStatus, error)
ParseSettlementStatus attempts to convert a string to a SettlementStatus
func (*SettlementStatus) DecodeMsg ¶
func (z *SettlementStatus) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (SettlementStatus) EncodeMsg ¶
func (z SettlementStatus) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (SettlementStatus) MarshalMsg ¶
func (z SettlementStatus) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (SettlementStatus) MarshalText ¶
func (x SettlementStatus) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method
func (SettlementStatus) Msgsize ¶
func (z SettlementStatus) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (SettlementStatus) String ¶
func (x SettlementStatus) String() string
String implements the Stringer interface.
func (*SettlementStatus) UnmarshalMsg ¶
func (z *SettlementStatus) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
func (*SettlementStatus) UnmarshalText ¶
func (x *SettlementStatus) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method
type SignContractParam ¶
type SignContractParam struct { ContractAddress types.Address `msg:"a,extension" json:"contractAddress"` ConfirmDate int64 `msg:"cd" json:"confirmDate"` }
func (*SignContractParam) DecodeMsg ¶
func (z *SignContractParam) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (SignContractParam) EncodeMsg ¶
func (z SignContractParam) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*SignContractParam) FromABI ¶
func (z *SignContractParam) FromABI(data []byte) error
func (SignContractParam) MarshalMsg ¶
func (z SignContractParam) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (SignContractParam) Msgsize ¶
func (z SignContractParam) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*SignContractParam) ToABI ¶
func (z *SignContractParam) ToABI() ([]byte, error)
func (*SignContractParam) UnmarshalMsg ¶
func (z *SignContractParam) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
func (*SignContractParam) Verify ¶
func (z *SignContractParam) Verify() (bool, error)
type StopParam ¶
type StopParam struct { ContractAddress types.Address `msg:"ca" json:"contractAddress"` StopName string `msg:"n" json:"stopName" validate:"nonzero"` }
func (*StopParam) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*StopParam) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*StopParam) UnmarshalMsg ¶
UnmarshalMsg implements msgp.Unmarshaler
type SummaryRecord ¶
type SummaryRecord struct { Total uint64 `json:"total"` Success uint64 `json:"success"` Fail uint64 `json:"fail"` Result float64 `json:"result"` }
func (*SummaryRecord) DoCalculate ¶
func (z *SummaryRecord) DoCalculate() *SummaryRecord
func (*SummaryRecord) String ¶
func (z *SummaryRecord) String() string
type SummaryResult ¶
type SummaryResult struct { Contract *ContractParam `json:"contract"` Records map[string]*CompareRecord `json:"records"` Total *CompareRecord `json:"total"` }
func GetSummaryReport ¶
func GetSummaryReport(store ledger.Store, addr *types.Address, start, end int64) (*SummaryResult, error)
GetSummaryReport addr settlement contract address
func (*SummaryResult) DoCalculate ¶
func (z *SummaryResult) DoCalculate()
func (*SummaryResult) String ¶
func (z *SummaryResult) String() string
func (*SummaryResult) UpdateState ¶
func (z *SummaryResult) UpdateState(sender, party string, isMatching, state bool)
type TerminateParam ¶
type TerminateParam struct { ContractAddress types.Address `msg:"a,extension" json:"contractAddress"` Request bool `msg:"r" json:"request"` }
func (*TerminateParam) DecodeMsg ¶
func (z *TerminateParam) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (TerminateParam) EncodeMsg ¶
func (z TerminateParam) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*TerminateParam) FromABI ¶
func (z *TerminateParam) FromABI(data []byte) error
func (TerminateParam) MarshalMsg ¶
func (z TerminateParam) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (TerminateParam) Msgsize ¶
func (z TerminateParam) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*TerminateParam) String ¶
func (z *TerminateParam) String() string
func (*TerminateParam) ToABI ¶
func (z *TerminateParam) ToABI() ([]byte, error)
func (*TerminateParam) UnmarshalMsg ¶
func (z *TerminateParam) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
func (*TerminateParam) Verify ¶
func (z *TerminateParam) Verify() error
type Terminator ¶
type Terminator struct { Address types.Address `msg:"a,extension" json:"address"` // terminator qlc address Request bool `msg:"r" json:"request"` // request operate, true or false }
func (*Terminator) DecodeMsg ¶
func (z *Terminator) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (Terminator) EncodeMsg ¶
func (z Terminator) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (Terminator) MarshalMsg ¶
func (z Terminator) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (Terminator) Msgsize ¶
func (z Terminator) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*Terminator) String ¶
func (z *Terminator) String() string
func (*Terminator) UnmarshalMsg ¶
func (z *Terminator) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type UpdateStopParam ¶
type UpdateStopParam struct { ContractAddress types.Address `msg:"ca" json:"contractAddress"` StopName string `msg:"n" json:"stopName" validate:"nonzero"` New string `msg:"n2" json:"newName" validate:"nonzero"` }
func (*UpdateStopParam) DecodeMsg ¶
func (z *UpdateStopParam) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*UpdateStopParam) EncodeMsg ¶
func (z *UpdateStopParam) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*UpdateStopParam) FromABI ¶
func (z *UpdateStopParam) FromABI(methodName string, data []byte) error
func (*UpdateStopParam) MarshalMsg ¶
func (z *UpdateStopParam) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*UpdateStopParam) Msgsize ¶
func (z *UpdateStopParam) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*UpdateStopParam) UnmarshalMsg ¶
func (z *UpdateStopParam) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
func (*UpdateStopParam) Verify ¶
func (z *UpdateStopParam) Verify() error
Source Files ¶
- abi_settlement.go
- abier.go
- asset.go
- asset_enum.go
- asset_gen.go
- cdr_param.go
- cdr_param_enum.go
- cdr_param_gen.go
- cdr_status.go
- cdr_status_enum.go
- cdr_status_gen.go
- contract_address_list.go
- contract_address_list_gen.go
- contract_param.go
- contract_param_gen.go
- contractor.go
- contractor_gen.go
- create_contract_param.go
- create_contract_param_enum.go
- create_contract_param_gen.go
- invoice.go
- sign_contract_param.go
- sign_contract_param_gen.go
- stop.go
- stop_gen.go
- summary_report.go
- terminate_param.go
- terminate_param_gen.go