Documentation ¶
Index ¶
- func CS2Readable(contents interface{}) (interface{}, error)
- func Content2Readable(content *core.QContent) (map[string]interface{}, error)
- func FBCommunity2Community(uid string, fbc *FBCommunity) (*core.Community, error)
- func FBIndividual2Individual(uid string, fbi *FBIndividual) (*core.Individual, error)
- func FBQuantum2Quantum(uid string, fbq *FBQuantum) (*core.Quantum, error)
- func FBStruct2Data(fbstruct interface{}) (map[string]interface{}, error)
- type FBCommunity
- type FBContent
- type FBIndividual
- type FBQuantum
- type FBSig
- type FBUniverse
- func (fbu *FBUniverse) Close() error
- func (fbu *FBUniverse) GetCommunity(sig core.Sig) (*core.Community, error)
- func (fbu *FBUniverse) GetIndividual(address identity.Address) (*core.Individual, error)
- func (fbu *FBUniverse) GetQuantum(sig core.Sig) (*core.Quantum, error)
- func (fbu *FBUniverse) JudgeCommunity(sig core.Sig, level int, statement string) error
- func (fbu *FBUniverse) JudgeIndividual(address identity.Address, level int, judgment string, evidence ...[]core.Sig) error
- func (fbu *FBUniverse) ProcessQuantum(skip, limit int) (accept []core.Sig, wait []core.Sig, reject []core.Sig, err error)
- func (fbu *FBUniverse) ProcessSingleQuantum(sig core.Sig) error
- func (fbu *FBUniverse) QueryIndividual(sig core.Sig, skip int, limit int, desc bool) ([]*core.Individual, error)
- func (fbu *FBUniverse) QueryQuantum(address identity.Address, qType int, skip int, limit int, desc bool) ([]*core.Quantum, error)
- func (fbu *FBUniverse) ReceiveQuantum(originQuantums []*core.Quantum) (accept []core.Sig, wait []core.Sig, reject []core.Sig, err error)
- type UniverseStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CS2Readable ¶
func CS2Readable(contents interface{}) (interface{}, error)
func Content2Readable ¶
func FBCommunity2Community ¶
func FBCommunity2Community(uid string, fbc *FBCommunity) (*core.Community, error)
func FBIndividual2Individual ¶
func FBIndividual2Individual(uid string, fbi *FBIndividual) (*core.Individual, error)
func FBStruct2Data ¶
Types ¶
type FBCommunity ¶
type FBCommunity struct { Note *core.QContent `json:"note"` CreatorAddrHex string `json:"creator"` MinCosignCnt int `json:"minCosignCnt"` MaxInviteCnt int `json:"maxInviteCnt"` InitMembersHex []string `json:"initMembers,omitempty"` Members map[string]bool `json:"members,omitempty"` InviteCnt map[string]int `json:"inviteCnt,omitempty"` }
func Data2FBCommunity ¶
func Data2FBCommunity(d map[string]interface{}) (*FBCommunity, error)
type FBContent ¶
type FBContent struct { Data interface{} `json:"data,omitempty"` Format int `json:"fmt"` }
type FBIndividual ¶
type FBIndividual struct { LastSigHex string `json:"last"` // last sig of quantum LastSelfSeq int64 `json:"lseq"` // last self sequance Profile map[string]*core.QContent `json:"profile,omitempty"` Attitude *core.Attitude `json:"attitude"` }
func Data2FBIndividual ¶
func Data2FBIndividual(d map[string]interface{}) (*FBIndividual, error)
type FBQuantum ¶
type FBQuantum struct { Contents []*core.QContent `json:"cs,omitempty"` Type int `json:"type"` FBRef []*FBSig `json:"refs"` Sequence int64 `json:"seq,omitempty"` SelfSeq int64 `json:"sseq,omitempty"` AddrHex string `json:"address,omitempty"` ReadableCS []*FBContent `json:"rcs,omitempty"` }
func Data2FBQuantum ¶
type FBUniverse ¶
type FBUniverse struct {
// contains filtered or unexported fields
}
func NewFBUniverse ¶
func (*FBUniverse) Close ¶
func (fbu *FBUniverse) Close() error
func (*FBUniverse) GetCommunity ¶
func (*FBUniverse) GetIndividual ¶
func (fbu *FBUniverse) GetIndividual(address identity.Address) (*core.Individual, error)
func (*FBUniverse) GetQuantum ¶
func (*FBUniverse) JudgeCommunity ¶
func (*FBUniverse) JudgeIndividual ¶
func (*FBUniverse) ProcessQuantum ¶
func (*FBUniverse) ProcessSingleQuantum ¶
func (fbu *FBUniverse) ProcessSingleQuantum(sig core.Sig) error
func (*FBUniverse) QueryIndividual ¶
func (fbu *FBUniverse) QueryIndividual(sig core.Sig, skip int, limit int, desc bool) ([]*core.Individual, error)
func (*FBUniverse) QueryQuantum ¶
type UniverseStatus ¶
type UniverseStatus struct {
Sequence int64 `json:"universeSequence,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.