Documentation ¶
Index ¶
- func TrustsToGRPC(xs []*Trust) (res []*reputation.Trust)
- type AnnounceIntermediateResultRequest
- func (x *AnnounceIntermediateResultRequest) FromGRPCMessage(m grpc.Message) error
- func (x *AnnounceIntermediateResultRequest) GetBody() *AnnounceIntermediateResultRequestBody
- func (x *AnnounceIntermediateResultRequest) SetBody(v *AnnounceIntermediateResultRequestBody)
- func (x *AnnounceIntermediateResultRequest) ToGRPCMessage() grpc.Message
- type AnnounceIntermediateResultRequestBody
- func (x *AnnounceIntermediateResultRequestBody) FromGRPCMessage(m grpc.Message) error
- func (x *AnnounceIntermediateResultRequestBody) GetEpoch() uint64
- func (x *AnnounceIntermediateResultRequestBody) GetIteration() uint32
- func (x *AnnounceIntermediateResultRequestBody) GetTrust() *PeerToPeerTrust
- func (x *AnnounceIntermediateResultRequestBody) SetEpoch(v uint64)
- func (x *AnnounceIntermediateResultRequestBody) SetIteration(v uint32)
- func (x *AnnounceIntermediateResultRequestBody) SetTrust(v *PeerToPeerTrust)
- func (x *AnnounceIntermediateResultRequestBody) StableMarshal(buf []byte) ([]byte, error)
- func (x *AnnounceIntermediateResultRequestBody) StableSize() (size int)
- func (x *AnnounceIntermediateResultRequestBody) ToGRPCMessage() grpc.Message
- func (x *AnnounceIntermediateResultRequestBody) Unmarshal(data []byte) error
- type AnnounceIntermediateResultResponse
- func (x *AnnounceIntermediateResultResponse) FromGRPCMessage(m grpc.Message) error
- func (x *AnnounceIntermediateResultResponse) GetBody() *AnnounceIntermediateResultResponseBody
- func (x *AnnounceIntermediateResultResponse) SetBody(v *AnnounceIntermediateResultResponseBody)
- func (x *AnnounceIntermediateResultResponse) ToGRPCMessage() grpc.Message
- type AnnounceIntermediateResultResponseBody
- func (x *AnnounceIntermediateResultResponseBody) FromGRPCMessage(m grpc.Message) error
- func (x *AnnounceIntermediateResultResponseBody) StableMarshal(buf []byte) ([]byte, error)
- func (x *AnnounceIntermediateResultResponseBody) StableSize() int
- func (x *AnnounceIntermediateResultResponseBody) ToGRPCMessage() grpc.Message
- func (x *AnnounceIntermediateResultResponseBody) Unmarshal(data []byte) error
- type AnnounceLocalTrustRequest
- type AnnounceLocalTrustRequestBody
- func (x *AnnounceLocalTrustRequestBody) FromGRPCMessage(m grpc.Message) error
- func (x *AnnounceLocalTrustRequestBody) GetEpoch() uint64
- func (x *AnnounceLocalTrustRequestBody) GetTrusts() []*Trust
- func (x *AnnounceLocalTrustRequestBody) SetEpoch(v uint64)
- func (x *AnnounceLocalTrustRequestBody) SetTrusts(v []*Trust)
- func (x *AnnounceLocalTrustRequestBody) StableMarshal(buf []byte) ([]byte, error)
- func (x *AnnounceLocalTrustRequestBody) StableSize() (size int)
- func (x *AnnounceLocalTrustRequestBody) ToGRPCMessage() grpc.Message
- func (x *AnnounceLocalTrustRequestBody) Unmarshal(data []byte) error
- type AnnounceLocalTrustResponse
- type AnnounceLocalTrustResponseBody
- func (x *AnnounceLocalTrustResponseBody) FromGRPCMessage(m grpc.Message) error
- func (x *AnnounceLocalTrustResponseBody) StableMarshal(buf []byte) ([]byte, error)
- func (x *AnnounceLocalTrustResponseBody) StableSize() int
- func (x *AnnounceLocalTrustResponseBody) ToGRPCMessage() grpc.Message
- func (x *AnnounceLocalTrustResponseBody) Unmarshal(data []byte) error
- type GlobalTrust
- func (x *GlobalTrust) FromGRPCMessage(m grpc.Message) error
- func (x *GlobalTrust) GetBody() *GlobalTrustBody
- func (x *GlobalTrust) GetSignature() *refs.Signature
- func (x *GlobalTrust) GetVersion() *refs.Version
- func (x *GlobalTrust) MarshalJSON() ([]byte, error)
- func (x *GlobalTrust) SetBody(v *GlobalTrustBody)
- func (x *GlobalTrust) SetSignature(v *refs.Signature)
- func (x *GlobalTrust) SetVersion(v *refs.Version)
- func (x *GlobalTrust) StableMarshal(buf []byte) ([]byte, error)
- func (x *GlobalTrust) StableSize() (size int)
- func (x *GlobalTrust) ToGRPCMessage() grpc.Message
- func (x *GlobalTrust) Unmarshal(data []byte) error
- func (x *GlobalTrust) UnmarshalJSON(data []byte) error
- type GlobalTrustBody
- func (x *GlobalTrustBody) FromGRPCMessage(m grpc.Message) error
- func (x *GlobalTrustBody) GetManager() *PeerID
- func (x *GlobalTrustBody) GetTrust() *Trust
- func (x *GlobalTrustBody) SetManager(v *PeerID)
- func (x *GlobalTrustBody) SetTrust(v *Trust)
- func (x *GlobalTrustBody) StableMarshal(buf []byte) ([]byte, error)
- func (x *GlobalTrustBody) StableSize() (size int)
- func (x *GlobalTrustBody) ToGRPCMessage() grpc.Message
- func (x *GlobalTrustBody) Unmarshal(data []byte) error
- type PeerID
- func (x *PeerID) FromGRPCMessage(m grpc.Message) error
- func (x *PeerID) GetPublicKey() []byte
- func (x *PeerID) MarshalJSON() ([]byte, error)
- func (x *PeerID) SetPublicKey(v []byte)
- func (x *PeerID) StableMarshal(buf []byte) ([]byte, error)
- func (x *PeerID) StableSize() (size int)
- func (x *PeerID) ToGRPCMessage() grpc.Message
- func (x *PeerID) Unmarshal(data []byte) error
- func (x *PeerID) UnmarshalJSON(data []byte) error
- type PeerToPeerTrust
- func (x *PeerToPeerTrust) FromGRPCMessage(m grpc.Message) error
- func (x *PeerToPeerTrust) GetTrust() *Trust
- func (x *PeerToPeerTrust) GetTrustingPeer() *PeerID
- func (x *PeerToPeerTrust) MarshalJSON() ([]byte, error)
- func (x *PeerToPeerTrust) SetTrust(v *Trust)
- func (x *PeerToPeerTrust) SetTrustingPeer(v *PeerID)
- func (x *PeerToPeerTrust) StableMarshal(buf []byte) ([]byte, error)
- func (x *PeerToPeerTrust) StableSize() (size int)
- func (x *PeerToPeerTrust) ToGRPCMessage() grpc.Message
- func (x *PeerToPeerTrust) Unmarshal(data []byte) error
- func (x *PeerToPeerTrust) UnmarshalJSON(data []byte) error
- type Trust
- func (x *Trust) FromGRPCMessage(m grpc.Message) error
- func (x *Trust) GetPeer() *PeerID
- func (x *Trust) GetValue() float64
- func (x *Trust) MarshalJSON() ([]byte, error)
- func (x *Trust) SetPeer(v *PeerID)
- func (x *Trust) SetValue(v float64)
- func (x *Trust) StableMarshal(buf []byte) ([]byte, error)
- func (x *Trust) StableSize() (size int)
- func (x *Trust) ToGRPCMessage() grpc.Message
- func (x *Trust) Unmarshal(data []byte) error
- func (x *Trust) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TrustsToGRPC ¶
func TrustsToGRPC(xs []*Trust) (res []*reputation.Trust)
TrustsToGRPC converts slice of Trust structures to slice of gRPC-generated Trust messages.
Types ¶
type AnnounceIntermediateResultRequest ¶
type AnnounceIntermediateResultRequest struct { session.RequestHeaders // contains filtered or unexported fields }
AnnounceIntermediateResultRequest represents reputation.AnnounceIntermediateResult message from NeoFS API v2.
func (*AnnounceIntermediateResultRequest) FromGRPCMessage ¶
func (x *AnnounceIntermediateResultRequest) FromGRPCMessage(m grpc.Message) error
FromGRPCMessage tries to restore AnnounceIntermediateResultRequest from grpc.Message.
Returns message.ErrUnexpectedMessageType if m is not a gRPC-generated reputation.AnnounceIntermediateResultRequest message.
func (*AnnounceIntermediateResultRequest) GetBody ¶
func (x *AnnounceIntermediateResultRequest) GetBody() *AnnounceIntermediateResultRequestBody
GetBody returns request body.
func (*AnnounceIntermediateResultRequest) SetBody ¶
func (x *AnnounceIntermediateResultRequest) SetBody(v *AnnounceIntermediateResultRequestBody)
SetBody sets request body.
func (*AnnounceIntermediateResultRequest) ToGRPCMessage ¶
func (x *AnnounceIntermediateResultRequest) ToGRPCMessage() grpc.Message
ToGRPCMessage converts AnnounceIntermediateResultRequest to gRPC-generated reputation.AnnounceIntermediateResultRequest message.
type AnnounceIntermediateResultRequestBody ¶
type AnnounceIntermediateResultRequestBody struct {
// contains filtered or unexported fields
}
AnnounceIntermediateResultRequestBody is a structure of AnnounceIntermediateResult request body.
func (*AnnounceIntermediateResultRequestBody) FromGRPCMessage ¶
func (x *AnnounceIntermediateResultRequestBody) FromGRPCMessage(m grpc.Message) error
FromGRPCMessage tries to restore AnnounceIntermediateResultRequestBody from grpc.Message.
Returns message.ErrUnexpectedMessageType if m is not a gRPC-generated reputation.AnnounceIntermediateResultRequest_Body message.
func (*AnnounceIntermediateResultRequestBody) GetEpoch ¶
func (x *AnnounceIntermediateResultRequestBody) GetEpoch() uint64
GetEpoch returns epoch number in which the intermediate trust was assessed.
func (*AnnounceIntermediateResultRequestBody) GetIteration ¶
func (x *AnnounceIntermediateResultRequestBody) GetIteration() uint32
GetIteration returns sequence number of the iteration.
func (*AnnounceIntermediateResultRequestBody) GetTrust ¶
func (x *AnnounceIntermediateResultRequestBody) GetTrust() *PeerToPeerTrust
GetTrust returns current global trust value.
func (*AnnounceIntermediateResultRequestBody) SetEpoch ¶
func (x *AnnounceIntermediateResultRequestBody) SetEpoch(v uint64)
SetEpoch sets epoch number in which the intermediate trust was assessed.
func (*AnnounceIntermediateResultRequestBody) SetIteration ¶
func (x *AnnounceIntermediateResultRequestBody) SetIteration(v uint32)
SetIteration sets sequence number of the iteration.
func (*AnnounceIntermediateResultRequestBody) SetTrust ¶
func (x *AnnounceIntermediateResultRequestBody) SetTrust(v *PeerToPeerTrust)
SetTrust sets current global trust value.
func (*AnnounceIntermediateResultRequestBody) StableMarshal ¶
func (x *AnnounceIntermediateResultRequestBody) StableMarshal(buf []byte) ([]byte, error)
func (*AnnounceIntermediateResultRequestBody) StableSize ¶
func (x *AnnounceIntermediateResultRequestBody) StableSize() (size int)
func (*AnnounceIntermediateResultRequestBody) ToGRPCMessage ¶
func (x *AnnounceIntermediateResultRequestBody) ToGRPCMessage() grpc.Message
ToGRPCMessage converts AnnounceIntermediateResultRequestBody to gRPC-generated reputation.AnnounceIntermediateResultRequest_Body message.
func (*AnnounceIntermediateResultRequestBody) Unmarshal ¶
func (x *AnnounceIntermediateResultRequestBody) Unmarshal(data []byte) error
type AnnounceIntermediateResultResponse ¶
type AnnounceIntermediateResultResponse struct { session.ResponseHeaders // contains filtered or unexported fields }
AnnounceIntermediateResultResponse represents reputation.AnnounceIntermediateResultResponse message from NeoFS API v2.
func (*AnnounceIntermediateResultResponse) FromGRPCMessage ¶
func (x *AnnounceIntermediateResultResponse) FromGRPCMessage(m grpc.Message) error
FromGRPCMessage tries to restore AnnounceIntermediateResultResponse from grpc.Message.
Returns message.ErrUnexpectedMessageType if m is not a gRPC-generated reputation.AnnounceIntermediateResultResponse message.
func (*AnnounceIntermediateResultResponse) GetBody ¶
func (x *AnnounceIntermediateResultResponse) GetBody() *AnnounceIntermediateResultResponseBody
GetBody returns response body.
func (*AnnounceIntermediateResultResponse) SetBody ¶
func (x *AnnounceIntermediateResultResponse) SetBody(v *AnnounceIntermediateResultResponseBody)
SetBody sets response body.
func (*AnnounceIntermediateResultResponse) ToGRPCMessage ¶
func (x *AnnounceIntermediateResultResponse) ToGRPCMessage() grpc.Message
ToGRPCMessage converts AnnounceIntermediateResultResponse to gRPC-generated reputation.AnnounceIntermediateResultResponse message.
type AnnounceIntermediateResultResponseBody ¶
type AnnounceIntermediateResultResponseBody struct{}
AnnounceIntermediateResultResponseBody is a structure of AnnounceIntermediateResult response body.
func (*AnnounceIntermediateResultResponseBody) FromGRPCMessage ¶
func (x *AnnounceIntermediateResultResponseBody) FromGRPCMessage(m grpc.Message) error
FromGRPCMessage tries to restore AnnounceIntermediateResultResponseBody from grpc.Message.
Returns message.ErrUnexpectedMessageType if m is not a gRPC-generated reputation.AnnounceIntermediateResultResponse_Body message.
func (*AnnounceIntermediateResultResponseBody) StableMarshal ¶
func (x *AnnounceIntermediateResultResponseBody) StableMarshal(buf []byte) ([]byte, error)
func (*AnnounceIntermediateResultResponseBody) StableSize ¶
func (x *AnnounceIntermediateResultResponseBody) StableSize() int
func (*AnnounceIntermediateResultResponseBody) ToGRPCMessage ¶
func (x *AnnounceIntermediateResultResponseBody) ToGRPCMessage() grpc.Message
ToGRPCMessage converts AnnounceIntermediateResultResponseBody to gRPC-generated reputation.AnnounceIntermediateResultResponse_Body message.
func (*AnnounceIntermediateResultResponseBody) Unmarshal ¶
func (x *AnnounceIntermediateResultResponseBody) Unmarshal(data []byte) error
type AnnounceLocalTrustRequest ¶
type AnnounceLocalTrustRequest struct { session.RequestHeaders // contains filtered or unexported fields }
AnnounceLocalTrustRequest represents reputation.AnnounceLocalTrustRequest message from NeoFS API v2.
func (*AnnounceLocalTrustRequest) FromGRPCMessage ¶
func (x *AnnounceLocalTrustRequest) FromGRPCMessage(m grpc.Message) error
FromGRPCMessage tries to restore AnnounceLocalTrustRequest from grpc.Message.
Returns message.ErrUnexpectedMessageType if m is not a gRPC-generated reputation.AnnounceLocalTrustRequest message.
func (*AnnounceLocalTrustRequest) GetBody ¶
func (x *AnnounceLocalTrustRequest) GetBody() *AnnounceLocalTrustRequestBody
GetBody returns request body.
func (*AnnounceLocalTrustRequest) SetBody ¶
func (x *AnnounceLocalTrustRequest) SetBody(v *AnnounceLocalTrustRequestBody)
SetBody sets request body.
func (*AnnounceLocalTrustRequest) ToGRPCMessage ¶
func (x *AnnounceLocalTrustRequest) ToGRPCMessage() grpc.Message
ToGRPCMessage converts AnnounceLocalTrustRequest to gRPC-generated reputation.AnnounceLocalTrustRequest message.
type AnnounceLocalTrustRequestBody ¶
type AnnounceLocalTrustRequestBody struct {
// contains filtered or unexported fields
}
AnnounceLocalTrustRequestBody is a structure of AnnounceLocalTrust request body.
func (*AnnounceLocalTrustRequestBody) FromGRPCMessage ¶
func (x *AnnounceLocalTrustRequestBody) FromGRPCMessage(m grpc.Message) error
FromGRPCMessage tries to restore AnnounceLocalTrustRequestBody from grpc.Message.
Returns message.ErrUnexpectedMessageType if m is not a gRPC-generated reputation.AnnounceLocalTrustRequest_Body message.
func (*AnnounceLocalTrustRequestBody) GetEpoch ¶
func (x *AnnounceLocalTrustRequestBody) GetEpoch() uint64
GetEpoch returns epoch in which the trust was assessed.
func (*AnnounceLocalTrustRequestBody) GetTrusts ¶
func (x *AnnounceLocalTrustRequestBody) GetTrusts() []*Trust
GetTrusts returns list of normalized trust values.
func (*AnnounceLocalTrustRequestBody) SetEpoch ¶
func (x *AnnounceLocalTrustRequestBody) SetEpoch(v uint64)
SetEpoch sets epoch in which the trust was assessed.
func (*AnnounceLocalTrustRequestBody) SetTrusts ¶
func (x *AnnounceLocalTrustRequestBody) SetTrusts(v []*Trust)
SetTrusts sets list of normalized trust values.
func (*AnnounceLocalTrustRequestBody) StableMarshal ¶
func (x *AnnounceLocalTrustRequestBody) StableMarshal(buf []byte) ([]byte, error)
func (*AnnounceLocalTrustRequestBody) StableSize ¶
func (x *AnnounceLocalTrustRequestBody) StableSize() (size int)
func (*AnnounceLocalTrustRequestBody) ToGRPCMessage ¶
func (x *AnnounceLocalTrustRequestBody) ToGRPCMessage() grpc.Message
ToGRPCMessage converts AnnounceLocalTrustRequestBody to gRPC-generated reputation.AnnounceLocalTrustRequest_Body message.
func (*AnnounceLocalTrustRequestBody) Unmarshal ¶
func (x *AnnounceLocalTrustRequestBody) Unmarshal(data []byte) error
type AnnounceLocalTrustResponse ¶
type AnnounceLocalTrustResponse struct { session.ResponseHeaders // contains filtered or unexported fields }
AnnounceLocalTrustResponse represents reputation.AnnounceLocalTrustResponse message from NeoFS API v2.
func (*AnnounceLocalTrustResponse) FromGRPCMessage ¶
func (x *AnnounceLocalTrustResponse) FromGRPCMessage(m grpc.Message) error
FromGRPCMessage tries to restore AnnounceLocalTrustResponse from grpc.Message.
Returns message.ErrUnexpectedMessageType if m is not a gRPC-generated reputation.AnnounceLocalTrustResponse message.
func (*AnnounceLocalTrustResponse) GetBody ¶
func (x *AnnounceLocalTrustResponse) GetBody() *AnnounceLocalTrustResponseBody
GetBody returns response body.
func (*AnnounceLocalTrustResponse) SetBody ¶
func (x *AnnounceLocalTrustResponse) SetBody(v *AnnounceLocalTrustResponseBody)
SetBody sets response body.
func (*AnnounceLocalTrustResponse) ToGRPCMessage ¶
func (x *AnnounceLocalTrustResponse) ToGRPCMessage() grpc.Message
ToGRPCMessage converts AnnounceLocalTrustResponse to gRPC-generated reputation.AnnounceLocalTrustResponse message.
type AnnounceLocalTrustResponseBody ¶
type AnnounceLocalTrustResponseBody struct{}
AnnounceLocalTrustResponseBody is a structure of AnnounceLocalTrust response body.
func (*AnnounceLocalTrustResponseBody) FromGRPCMessage ¶
func (x *AnnounceLocalTrustResponseBody) FromGRPCMessage(m grpc.Message) error
FromGRPCMessage tries to restore AnnounceLocalTrustResponseBody from grpc.Message.
Returns message.ErrUnexpectedMessageType if m is not a gRPC-generated reputation.AnnounceLocalTrustResponse_Body message.
func (*AnnounceLocalTrustResponseBody) StableMarshal ¶
func (x *AnnounceLocalTrustResponseBody) StableMarshal(buf []byte) ([]byte, error)
func (*AnnounceLocalTrustResponseBody) StableSize ¶
func (x *AnnounceLocalTrustResponseBody) StableSize() int
func (*AnnounceLocalTrustResponseBody) ToGRPCMessage ¶
func (x *AnnounceLocalTrustResponseBody) ToGRPCMessage() grpc.Message
ToGRPCMessage converts AnnounceLocalTrustResponseBody to gRPC-generated reputation.AnnounceLocalTrustResponse_Body message.
func (*AnnounceLocalTrustResponseBody) Unmarshal ¶
func (x *AnnounceLocalTrustResponseBody) Unmarshal(data []byte) error
type GlobalTrust ¶
type GlobalTrust struct {
// contains filtered or unexported fields
}
GlobalTrust represents reputation.GlobalTrust message from NeoFS API v2.
func (*GlobalTrust) FromGRPCMessage ¶
func (x *GlobalTrust) FromGRPCMessage(m grpc.Message) error
FromGRPCMessage tries to restore GlobalTrust from grpc.Message.
Returns message.ErrUnexpectedMessageType if m is not a gRPC-generated reputation.GlobalTrust message.
func (*GlobalTrust) GetBody ¶
func (x *GlobalTrust) GetBody() *GlobalTrustBody
GetBody returns message body.
func (*GlobalTrust) GetSignature ¶
func (x *GlobalTrust) GetSignature() *refs.Signature
GetSignature returns body signature.
func (*GlobalTrust) GetVersion ¶
func (x *GlobalTrust) GetVersion() *refs.Version
GetVersion returns message format version.
func (*GlobalTrust) MarshalJSON ¶
func (x *GlobalTrust) MarshalJSON() ([]byte, error)
func (*GlobalTrust) SetBody ¶
func (x *GlobalTrust) SetBody(v *GlobalTrustBody)
SetBody sets message body.
func (*GlobalTrust) SetSignature ¶
func (x *GlobalTrust) SetSignature(v *refs.Signature)
SetSignature sets body signature.
func (*GlobalTrust) SetVersion ¶
func (x *GlobalTrust) SetVersion(v *refs.Version)
SetVersion sets message format version.
func (*GlobalTrust) StableMarshal ¶
func (x *GlobalTrust) StableMarshal(buf []byte) ([]byte, error)
func (*GlobalTrust) StableSize ¶
func (x *GlobalTrust) StableSize() (size int)
func (*GlobalTrust) ToGRPCMessage ¶
func (x *GlobalTrust) ToGRPCMessage() grpc.Message
ToGRPCMessage converts GlobalTrust to gRPC-generated reputation.GlobalTrust message.
func (*GlobalTrust) Unmarshal ¶
func (x *GlobalTrust) Unmarshal(data []byte) error
func (*GlobalTrust) UnmarshalJSON ¶
func (x *GlobalTrust) UnmarshalJSON(data []byte) error
type GlobalTrustBody ¶
type GlobalTrustBody struct {
// contains filtered or unexported fields
}
GlobalTrustBody represents reputation.GlobalTrust.Body message from NeoFS API v2.
func (*GlobalTrustBody) FromGRPCMessage ¶
func (x *GlobalTrustBody) FromGRPCMessage(m grpc.Message) error
FromGRPCMessage tries to restore GlobalTrustBody from grpc.Message.
Returns message.ErrUnexpectedMessageType if m is not a gRPC-generated reputation.GlobalTrust_Body message.
func (*GlobalTrustBody) GetManager ¶
func (x *GlobalTrustBody) GetManager() *PeerID
GetManager returns node manager ID.
func (*GlobalTrustBody) GetTrust ¶
func (x *GlobalTrustBody) GetTrust() *Trust
GetTrust returns global trust value.
func (*GlobalTrustBody) SetManager ¶
func (x *GlobalTrustBody) SetManager(v *PeerID)
SetManager sets node manager ID.
func (*GlobalTrustBody) SetTrust ¶
func (x *GlobalTrustBody) SetTrust(v *Trust)
SetTrust sets global trust value.
func (*GlobalTrustBody) StableMarshal ¶
func (x *GlobalTrustBody) StableMarshal(buf []byte) ([]byte, error)
func (*GlobalTrustBody) StableSize ¶
func (x *GlobalTrustBody) StableSize() (size int)
func (*GlobalTrustBody) ToGRPCMessage ¶
func (x *GlobalTrustBody) ToGRPCMessage() grpc.Message
ToGRPCMessage converts GlobalTrustBody to gRPC-generated reputation.GlobalTrust_Body message.
func (*GlobalTrustBody) Unmarshal ¶
func (x *GlobalTrustBody) Unmarshal(data []byte) error
type PeerID ¶
type PeerID struct {
// contains filtered or unexported fields
}
PeerID represents reputation.PeerID message from NeoFS API v2.
func (*PeerID) FromGRPCMessage ¶
FromGRPCMessage tries to restore PeerID from grpc.Message.
Returns message.ErrUnexpectedMessageType if m is not a gRPC-generated reputation.PeerID message.
func (*PeerID) GetPublicKey ¶
GetPublicKey returns peer's binary public key of ID.
func (*PeerID) MarshalJSON ¶
func (*PeerID) SetPublicKey ¶
SetPublicKey sets peer's binary public key of ID.
func (*PeerID) StableSize ¶
func (*PeerID) ToGRPCMessage ¶
ToGRPCMessage converts PeerID to gRPC-generated reputation.PeerID message.
func (*PeerID) UnmarshalJSON ¶
type PeerToPeerTrust ¶
type PeerToPeerTrust struct {
// contains filtered or unexported fields
}
PeerToPeerTrust represents reputation.PeerToPeerTrust message from NeoFS API v2.
func (*PeerToPeerTrust) FromGRPCMessage ¶
func (x *PeerToPeerTrust) FromGRPCMessage(m grpc.Message) error
FromGRPCMessage tries to restore PeerToPeerTrust from grpc.Message.
Returns message.ErrUnexpectedMessageType if m is not a gRPC-generated reputation.PeerToPeerTrust message.
func (*PeerToPeerTrust) GetTrust ¶
func (x *PeerToPeerTrust) GetTrust() *Trust
GetTrust returns trust value of trusting peer to the trusted one.
func (*PeerToPeerTrust) GetTrustingPeer ¶
func (x *PeerToPeerTrust) GetTrustingPeer() *PeerID
GetTrustingPeer returns trusting peer ID.
func (*PeerToPeerTrust) MarshalJSON ¶
func (x *PeerToPeerTrust) MarshalJSON() ([]byte, error)
func (*PeerToPeerTrust) SetTrust ¶
func (x *PeerToPeerTrust) SetTrust(v *Trust)
SetTrust sets trust value of trusting peer to the trusted one.
func (*PeerToPeerTrust) SetTrustingPeer ¶
func (x *PeerToPeerTrust) SetTrustingPeer(v *PeerID)
SetTrustingPeer sets trusting peer ID.
func (*PeerToPeerTrust) StableMarshal ¶
func (x *PeerToPeerTrust) StableMarshal(buf []byte) ([]byte, error)
func (*PeerToPeerTrust) StableSize ¶
func (x *PeerToPeerTrust) StableSize() (size int)
func (*PeerToPeerTrust) ToGRPCMessage ¶
func (x *PeerToPeerTrust) ToGRPCMessage() grpc.Message
ToGRPCMessage converts PeerToPeerTrust to gRPC-generated reputation.PeerToPeerTrust message.
func (*PeerToPeerTrust) Unmarshal ¶
func (x *PeerToPeerTrust) Unmarshal(data []byte) error
func (*PeerToPeerTrust) UnmarshalJSON ¶
func (x *PeerToPeerTrust) UnmarshalJSON(data []byte) error
type Trust ¶
type Trust struct {
// contains filtered or unexported fields
}
Trust represents reputation.Trust message from NeoFS API v2.
func TrustsFromGRPC ¶
func TrustsFromGRPC(xs []*reputation.Trust) (res []*Trust, err error)
TrustsFromGRPC tries to restore slice of Trust structures from slice of gRPC-generated reputation.Trust messages.
func (*Trust) FromGRPCMessage ¶
FromGRPCMessage tries to restore Trust from grpc.Message.
Returns message.ErrUnexpectedMessageType if m is not a gRPC-generated reputation.Trust message.
func (*Trust) MarshalJSON ¶
func (*Trust) StableSize ¶
func (*Trust) ToGRPCMessage ¶
ToGRPCMessage converts Trust to gRPC-generated reputation.Trust message.