Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterVotingServer(s grpc.ServiceRegistrar, srv VotingServer)
- type GetVoteRequest
- type GetVoteResponse
- func (*GetVoteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetVoteResponse) GetApp() string
- func (x *GetVoteResponse) GetChoice() *anypb.Any
- func (x *GetVoteResponse) GetCreated() int64
- func (x *GetVoteResponse) GetId() string
- func (x *GetVoteResponse) GetIpfs() string
- func (x *GetVoteResponse) GetOriginalDaoId() string
- func (x *GetVoteResponse) GetProposalId() string
- func (x *GetVoteResponse) GetReason() string
- func (x *GetVoteResponse) GetVoter() string
- func (x *GetVoteResponse) GetVp() float64
- func (x *GetVoteResponse) GetVpByStrategy() []float64
- func (x *GetVoteResponse) GetVpState() string
- func (*GetVoteResponse) ProtoMessage()
- func (x *GetVoteResponse) ProtoReflect() protoreflect.Message
- func (x *GetVoteResponse) Reset()
- func (x *GetVoteResponse) String() string
- type PrepareRequest
- func (*PrepareRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PrepareRequest) GetChoice() *anypb.Any
- func (x *PrepareRequest) GetProposal() string
- func (x *PrepareRequest) GetReason() string
- func (x *PrepareRequest) GetVoter() string
- func (*PrepareRequest) ProtoMessage()
- func (x *PrepareRequest) ProtoReflect() protoreflect.Message
- func (x *PrepareRequest) Reset()
- func (x *PrepareRequest) String() string
- type PrepareResponse
- func (*PrepareResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PrepareResponse) GetId() string
- func (x *PrepareResponse) GetTypedData() string
- func (*PrepareResponse) ProtoMessage()
- func (x *PrepareResponse) ProtoReflect() protoreflect.Message
- func (x *PrepareResponse) Reset()
- func (x *PrepareResponse) String() string
- type Relayer
- type UnimplementedVotingServer
- func (UnimplementedVotingServer) GetVote(context.Context, *GetVoteRequest) (*GetVoteResponse, error)
- func (UnimplementedVotingServer) Prepare(context.Context, *PrepareRequest) (*PrepareResponse, error)
- func (UnimplementedVotingServer) Validate(context.Context, *ValidateRequest) (*ValidateResponse, error)
- func (UnimplementedVotingServer) Vote(context.Context, *VoteRequest) (*VoteResponse, error)
- type UnsafeVotingServer
- type ValidateRequest
- func (*ValidateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ValidateRequest) GetProposal() string
- func (x *ValidateRequest) GetVoter() string
- func (*ValidateRequest) ProtoMessage()
- func (x *ValidateRequest) ProtoReflect() protoreflect.Message
- func (x *ValidateRequest) Reset()
- func (x *ValidateRequest) String() string
- type ValidateResponse
- func (*ValidateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ValidateResponse) GetOk() bool
- func (x *ValidateResponse) GetValidationError() *ValidationError
- func (x *ValidateResponse) GetVotingPower() float64
- func (*ValidateResponse) ProtoMessage()
- func (x *ValidateResponse) ProtoReflect() protoreflect.Message
- func (x *ValidateResponse) Reset()
- func (x *ValidateResponse) String() string
- type ValidationError
- func (*ValidationError) Descriptor() ([]byte, []int)deprecated
- func (x *ValidationError) GetCode() uint32
- func (x *ValidationError) GetMessage() string
- func (*ValidationError) ProtoMessage()
- func (x *ValidationError) ProtoReflect() protoreflect.Message
- func (x *ValidationError) Reset()
- func (x *ValidationError) String() string
- type VoteRequest
- type VoteResponse
- func (*VoteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VoteResponse) GetId() string
- func (x *VoteResponse) GetIpfs() string
- func (x *VoteResponse) GetRelayer() *Relayer
- func (*VoteResponse) ProtoMessage()
- func (x *VoteResponse) ProtoReflect() protoreflect.Message
- func (x *VoteResponse) Reset()
- func (x *VoteResponse) String() string
- type VotingClient
- type VotingServer
Constants ¶
const ( Voting_Validate_FullMethodName = "/votingpb.Voting/Validate" Voting_Prepare_FullMethodName = "/votingpb.Voting/Prepare" Voting_Vote_FullMethodName = "/votingpb.Voting/Vote" Voting_GetVote_FullMethodName = "/votingpb.Voting/GetVote" )
Variables ¶
var File_votingpb_voting_proto protoreflect.FileDescriptor
var Voting_ServiceDesc = grpc.ServiceDesc{ ServiceName: "votingpb.Voting", HandlerType: (*VotingServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Validate", Handler: _Voting_Validate_Handler, }, { MethodName: "Prepare", Handler: _Voting_Prepare_Handler, }, { MethodName: "Vote", Handler: _Voting_Vote_Handler, }, { MethodName: "GetVote", Handler: _Voting_GetVote_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "votingpb/voting.proto", }
Voting_ServiceDesc is the grpc.ServiceDesc for Voting service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterVotingServer ¶
func RegisterVotingServer(s grpc.ServiceRegistrar, srv VotingServer)
Types ¶
type GetVoteRequest ¶ added in v0.4.4
type GetVoteRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetVoteRequest) Descriptor
deprecated
added in
v0.4.4
func (*GetVoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetVoteRequest.ProtoReflect.Descriptor instead.
func (*GetVoteRequest) GetId ¶ added in v0.4.4
func (x *GetVoteRequest) GetId() string
func (*GetVoteRequest) ProtoMessage ¶ added in v0.4.4
func (*GetVoteRequest) ProtoMessage()
func (*GetVoteRequest) ProtoReflect ¶ added in v0.4.4
func (x *GetVoteRequest) ProtoReflect() protoreflect.Message
func (*GetVoteRequest) Reset ¶ added in v0.4.4
func (x *GetVoteRequest) Reset()
func (*GetVoteRequest) String ¶ added in v0.4.4
func (x *GetVoteRequest) String() string
type GetVoteResponse ¶ added in v0.4.4
type GetVoteResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Ipfs string `protobuf:"bytes,2,opt,name=ipfs,proto3" json:"ipfs,omitempty"` Voter string `protobuf:"bytes,3,opt,name=voter,proto3" json:"voter,omitempty"` Created int64 `protobuf:"varint,4,opt,name=created,proto3" json:"created,omitempty"` OriginalDaoId string `protobuf:"bytes,5,opt,name=original_dao_id,json=originalDaoId,proto3" json:"original_dao_id,omitempty"` ProposalId string `protobuf:"bytes,6,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` Choice *anypb.Any `protobuf:"bytes,7,opt,name=choice,proto3" json:"choice,omitempty"` Reason string `protobuf:"bytes,8,opt,name=reason,proto3" json:"reason,omitempty"` App string `protobuf:"bytes,9,opt,name=app,proto3" json:"app,omitempty"` Vp float64 `protobuf:"fixed64,10,opt,name=vp,proto3" json:"vp,omitempty"` VpByStrategy []float64 `protobuf:"fixed64,11,rep,packed,name=vp_by_strategy,json=vpByStrategy,proto3" json:"vp_by_strategy,omitempty"` VpState string `protobuf:"bytes,12,opt,name=vp_state,json=vpState,proto3" json:"vp_state,omitempty"` // contains filtered or unexported fields }
func (*GetVoteResponse) Descriptor
deprecated
added in
v0.4.4
func (*GetVoteResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetVoteResponse.ProtoReflect.Descriptor instead.
func (*GetVoteResponse) GetApp ¶ added in v0.4.4
func (x *GetVoteResponse) GetApp() string
func (*GetVoteResponse) GetChoice ¶ added in v0.4.4
func (x *GetVoteResponse) GetChoice() *anypb.Any
func (*GetVoteResponse) GetCreated ¶ added in v0.4.4
func (x *GetVoteResponse) GetCreated() int64
func (*GetVoteResponse) GetId ¶ added in v0.4.4
func (x *GetVoteResponse) GetId() string
func (*GetVoteResponse) GetIpfs ¶ added in v0.4.4
func (x *GetVoteResponse) GetIpfs() string
func (*GetVoteResponse) GetOriginalDaoId ¶ added in v0.4.4
func (x *GetVoteResponse) GetOriginalDaoId() string
func (*GetVoteResponse) GetProposalId ¶ added in v0.4.4
func (x *GetVoteResponse) GetProposalId() string
func (*GetVoteResponse) GetReason ¶ added in v0.4.4
func (x *GetVoteResponse) GetReason() string
func (*GetVoteResponse) GetVoter ¶ added in v0.4.4
func (x *GetVoteResponse) GetVoter() string
func (*GetVoteResponse) GetVp ¶ added in v0.4.4
func (x *GetVoteResponse) GetVp() float64
func (*GetVoteResponse) GetVpByStrategy ¶ added in v0.4.4
func (x *GetVoteResponse) GetVpByStrategy() []float64
func (*GetVoteResponse) GetVpState ¶ added in v0.4.4
func (x *GetVoteResponse) GetVpState() string
func (*GetVoteResponse) ProtoMessage ¶ added in v0.4.4
func (*GetVoteResponse) ProtoMessage()
func (*GetVoteResponse) ProtoReflect ¶ added in v0.4.4
func (x *GetVoteResponse) ProtoReflect() protoreflect.Message
func (*GetVoteResponse) Reset ¶ added in v0.4.4
func (x *GetVoteResponse) Reset()
func (*GetVoteResponse) String ¶ added in v0.4.4
func (x *GetVoteResponse) String() string
type PrepareRequest ¶
type PrepareRequest struct { Voter string `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"` Proposal string `protobuf:"bytes,2,opt,name=proposal,proto3" json:"proposal,omitempty"` Choice *anypb.Any `protobuf:"bytes,3,opt,name=choice,proto3" json:"choice,omitempty"` Reason *string `protobuf:"bytes,6,opt,name=reason,proto3,oneof" json:"reason,omitempty"` // contains filtered or unexported fields }
func (*PrepareRequest) Descriptor
deprecated
func (*PrepareRequest) Descriptor() ([]byte, []int)
Deprecated: Use PrepareRequest.ProtoReflect.Descriptor instead.
func (*PrepareRequest) GetChoice ¶
func (x *PrepareRequest) GetChoice() *anypb.Any
func (*PrepareRequest) GetProposal ¶
func (x *PrepareRequest) GetProposal() string
func (*PrepareRequest) GetReason ¶
func (x *PrepareRequest) GetReason() string
func (*PrepareRequest) GetVoter ¶
func (x *PrepareRequest) GetVoter() string
func (*PrepareRequest) ProtoMessage ¶
func (*PrepareRequest) ProtoMessage()
func (*PrepareRequest) ProtoReflect ¶
func (x *PrepareRequest) ProtoReflect() protoreflect.Message
func (*PrepareRequest) Reset ¶
func (x *PrepareRequest) Reset()
func (*PrepareRequest) String ¶
func (x *PrepareRequest) String() string
type PrepareResponse ¶
type PrepareResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` TypedData string `protobuf:"bytes,2,opt,name=typed_data,json=typedData,proto3" json:"typed_data,omitempty"` // contains filtered or unexported fields }
func (*PrepareResponse) Descriptor
deprecated
func (*PrepareResponse) Descriptor() ([]byte, []int)
Deprecated: Use PrepareResponse.ProtoReflect.Descriptor instead.
func (*PrepareResponse) GetId ¶
func (x *PrepareResponse) GetId() string
func (*PrepareResponse) GetTypedData ¶
func (x *PrepareResponse) GetTypedData() string
func (*PrepareResponse) ProtoMessage ¶
func (*PrepareResponse) ProtoMessage()
func (*PrepareResponse) ProtoReflect ¶
func (x *PrepareResponse) ProtoReflect() protoreflect.Message
func (*PrepareResponse) Reset ¶
func (x *PrepareResponse) Reset()
func (*PrepareResponse) String ¶
func (x *PrepareResponse) String() string
type Relayer ¶
type Relayer struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Receipt string `protobuf:"bytes,2,opt,name=receipt,proto3" json:"receipt,omitempty"` // contains filtered or unexported fields }
func (*Relayer) Descriptor
deprecated
func (*Relayer) GetAddress ¶
func (*Relayer) GetReceipt ¶
func (*Relayer) ProtoMessage ¶
func (*Relayer) ProtoMessage()
func (*Relayer) ProtoReflect ¶
func (x *Relayer) ProtoReflect() protoreflect.Message
type UnimplementedVotingServer ¶
type UnimplementedVotingServer struct{}
UnimplementedVotingServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedVotingServer) GetVote ¶ added in v0.4.4
func (UnimplementedVotingServer) GetVote(context.Context, *GetVoteRequest) (*GetVoteResponse, error)
func (UnimplementedVotingServer) Prepare ¶
func (UnimplementedVotingServer) Prepare(context.Context, *PrepareRequest) (*PrepareResponse, error)
func (UnimplementedVotingServer) Validate ¶
func (UnimplementedVotingServer) Validate(context.Context, *ValidateRequest) (*ValidateResponse, error)
func (UnimplementedVotingServer) Vote ¶
func (UnimplementedVotingServer) Vote(context.Context, *VoteRequest) (*VoteResponse, error)
type UnsafeVotingServer ¶
type UnsafeVotingServer interface {
// contains filtered or unexported methods
}
UnsafeVotingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VotingServer will result in compilation errors.
type ValidateRequest ¶
type ValidateRequest struct { Voter string `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"` Proposal string `protobuf:"bytes,2,opt,name=proposal,proto3" json:"proposal,omitempty"` // contains filtered or unexported fields }
func (*ValidateRequest) Descriptor
deprecated
func (*ValidateRequest) Descriptor() ([]byte, []int)
Deprecated: Use ValidateRequest.ProtoReflect.Descriptor instead.
func (*ValidateRequest) GetProposal ¶
func (x *ValidateRequest) GetProposal() string
func (*ValidateRequest) GetVoter ¶
func (x *ValidateRequest) GetVoter() string
func (*ValidateRequest) ProtoMessage ¶
func (*ValidateRequest) ProtoMessage()
func (*ValidateRequest) ProtoReflect ¶
func (x *ValidateRequest) ProtoReflect() protoreflect.Message
func (*ValidateRequest) Reset ¶
func (x *ValidateRequest) Reset()
func (*ValidateRequest) String ¶
func (x *ValidateRequest) String() string
type ValidateResponse ¶
type ValidateResponse struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` VotingPower float64 `protobuf:"fixed64,2,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` ValidationError *ValidationError `protobuf:"bytes,3,opt,name=validation_error,json=validationError,proto3,oneof" json:"validation_error,omitempty"` // contains filtered or unexported fields }
func (*ValidateResponse) Descriptor
deprecated
func (*ValidateResponse) Descriptor() ([]byte, []int)
Deprecated: Use ValidateResponse.ProtoReflect.Descriptor instead.
func (*ValidateResponse) GetOk ¶
func (x *ValidateResponse) GetOk() bool
func (*ValidateResponse) GetValidationError ¶
func (x *ValidateResponse) GetValidationError() *ValidationError
func (*ValidateResponse) GetVotingPower ¶
func (x *ValidateResponse) GetVotingPower() float64
func (*ValidateResponse) ProtoMessage ¶
func (*ValidateResponse) ProtoMessage()
func (*ValidateResponse) ProtoReflect ¶
func (x *ValidateResponse) ProtoReflect() protoreflect.Message
func (*ValidateResponse) Reset ¶
func (x *ValidateResponse) Reset()
func (*ValidateResponse) String ¶
func (x *ValidateResponse) String() string
type ValidationError ¶
type ValidationError struct { Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Code uint32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*ValidationError) Descriptor
deprecated
func (*ValidationError) Descriptor() ([]byte, []int)
Deprecated: Use ValidationError.ProtoReflect.Descriptor instead.
func (*ValidationError) GetCode ¶
func (x *ValidationError) GetCode() uint32
func (*ValidationError) GetMessage ¶
func (x *ValidationError) GetMessage() string
func (*ValidationError) ProtoMessage ¶
func (*ValidationError) ProtoMessage()
func (*ValidationError) ProtoReflect ¶
func (x *ValidationError) ProtoReflect() protoreflect.Message
func (*ValidationError) Reset ¶
func (x *ValidationError) Reset()
func (*ValidationError) String ¶
func (x *ValidationError) String() string
type VoteRequest ¶
type VoteRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Sig string `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"` // contains filtered or unexported fields }
func (*VoteRequest) Descriptor
deprecated
func (*VoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use VoteRequest.ProtoReflect.Descriptor instead.
func (*VoteRequest) GetId ¶
func (x *VoteRequest) GetId() string
func (*VoteRequest) GetSig ¶
func (x *VoteRequest) GetSig() string
func (*VoteRequest) ProtoMessage ¶
func (*VoteRequest) ProtoMessage()
func (*VoteRequest) ProtoReflect ¶
func (x *VoteRequest) ProtoReflect() protoreflect.Message
func (*VoteRequest) Reset ¶
func (x *VoteRequest) Reset()
func (*VoteRequest) String ¶
func (x *VoteRequest) String() string
type VoteResponse ¶
type VoteResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Ipfs string `protobuf:"bytes,2,opt,name=ipfs,proto3" json:"ipfs,omitempty"` Relayer *Relayer `protobuf:"bytes,3,opt,name=relayer,proto3" json:"relayer,omitempty"` // contains filtered or unexported fields }
func (*VoteResponse) Descriptor
deprecated
func (*VoteResponse) Descriptor() ([]byte, []int)
Deprecated: Use VoteResponse.ProtoReflect.Descriptor instead.
func (*VoteResponse) GetId ¶
func (x *VoteResponse) GetId() string
func (*VoteResponse) GetIpfs ¶
func (x *VoteResponse) GetIpfs() string
func (*VoteResponse) GetRelayer ¶
func (x *VoteResponse) GetRelayer() *Relayer
func (*VoteResponse) ProtoMessage ¶
func (*VoteResponse) ProtoMessage()
func (*VoteResponse) ProtoReflect ¶
func (x *VoteResponse) ProtoReflect() protoreflect.Message
func (*VoteResponse) Reset ¶
func (x *VoteResponse) Reset()
func (*VoteResponse) String ¶
func (x *VoteResponse) String() string
type VotingClient ¶
type VotingClient interface { Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error) Prepare(ctx context.Context, in *PrepareRequest, opts ...grpc.CallOption) (*PrepareResponse, error) Vote(ctx context.Context, in *VoteRequest, opts ...grpc.CallOption) (*VoteResponse, error) GetVote(ctx context.Context, in *GetVoteRequest, opts ...grpc.CallOption) (*GetVoteResponse, error) }
VotingClient is the client API for Voting service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewVotingClient ¶
func NewVotingClient(cc grpc.ClientConnInterface) VotingClient
type VotingServer ¶
type VotingServer interface { Validate(context.Context, *ValidateRequest) (*ValidateResponse, error) Prepare(context.Context, *PrepareRequest) (*PrepareResponse, error) Vote(context.Context, *VoteRequest) (*VoteResponse, error) GetVote(context.Context, *GetVoteRequest) (*GetVoteResponse, error) // contains filtered or unexported methods }
VotingServer is the server API for Voting service. All implementations must embed UnimplementedVotingServer for forward compatibility.