Documentation
¶
Index ¶
- type ClientWrapper
- func (w *ClientWrapper) Get(v GetArgs) (*GetResult, error)
- func (w *ClientWrapper) GetByID(v GetByIDArgs) (*GetResult, error)
- func (w *ClientWrapper) ListByEpoch(v ListByEpochArgs) (*ListByEpochResult, error)
- func (w *ClientWrapper) Put(v PutArgs) error
- func (w *ClientWrapper) PutViaNotary(v PutArgs) error
- type GetArgs
- type GetByIDArgs
- type GetResult
- type ListByEpochArgs
- type ListByEpochResult
- type PutArgs
- type ReputationID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientWrapper ¶
type ClientWrapper reputation.Client
ClientWrapper is a wrapper over reputation contract client which implements storage of reputation values.
func WrapClient ¶
func WrapClient(c *reputation.Client) *ClientWrapper
WrapClient wraps reputation contract client and returns ClientWrapper instance.
func (*ClientWrapper) Get ¶
func (w *ClientWrapper) Get(v GetArgs) (*GetResult, error)
Get invokes the call of "get reputation value" method of reputation contract.
func (*ClientWrapper) GetByID ¶
func (w *ClientWrapper) GetByID(v GetByIDArgs) (*GetResult, error)
GetByID invokes the call of "get reputation value by reputation id" method of reputation contract.
func (*ClientWrapper) ListByEpoch ¶
func (w *ClientWrapper) ListByEpoch(v ListByEpochArgs) (*ListByEpochResult, error)
ListByEpoch invokes the call of "list reputation ids by epoch" method of reputation contract.
func (*ClientWrapper) Put ¶
func (w *ClientWrapper) Put(v PutArgs) error
Put invokes direct call of "put reputation value" method of reputation contract.
func (*ClientWrapper) PutViaNotary ¶
func (w *ClientWrapper) PutViaNotary(v PutArgs) error
PutViaNotary invokes notary call of "put reputation value" method of reputation contract.
type GetArgs ¶
type GetArgs struct {
// contains filtered or unexported fields
}
GetArgs groups the arguments of "get reputation value" test invocation.
func (*GetArgs) SetPeerID ¶
func (g *GetArgs) SetPeerID(v reputation.PeerID)
SetPeerID sets peer id of expected reputation value.
type GetByIDArgs ¶
type GetByIDArgs struct {
// contains filtered or unexported fields
}
GetByIDArgs groups the arguments of "get reputation value by reputation id" test invocation.
func (*GetByIDArgs) SetID ¶
func (g *GetByIDArgs) SetID(v ReputationID)
SetID sets id of expected reputation value in reputation contract.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResults groups the result of "get reputation value" and "get reputation value by reputation id" test invocations.
func (GetResult) Reputations ¶
func (g GetResult) Reputations() []reputation.GlobalTrust
Reputations returns slice of reputation values.
type ListByEpochArgs ¶
type ListByEpochArgs struct {
// contains filtered or unexported fields
}
ListByEpochArgs groups the arguments of "list reputation ids by epoch" test invoke call.
func (*ListByEpochArgs) SetEpoch ¶
func (l *ListByEpochArgs) SetEpoch(v uint64)
SetEpoch sets epoch of expected reputation ids.
type ListByEpochResult ¶
type ListByEpochResult struct {
// contains filtered or unexported fields
}
ListByEpochResult groups the result of "list reputation ids by epoch" test invoke.
func (ListByEpochResult) IDs ¶
func (l ListByEpochResult) IDs() []ReputationID
IDs returns slice of reputation id values.
type PutArgs ¶
type PutArgs struct {
// contains filtered or unexported fields
}
PutArgs groups the arguments of "put reputation value" invocation call.
func (*PutArgs) SetPeerID ¶
func (p *PutArgs) SetPeerID(v reputation.PeerID)
SetPeerID sets peer id of reputation value.
func (*PutArgs) SetValue ¶
func (p *PutArgs) SetValue(v reputation.GlobalTrust)
SetValue sets reputation value.
type ReputationID ¶
type ReputationID []byte
ReputationID is an ID of the reputation record in reputation contract.