Documentation ¶
Index ¶
- Variables
- func RegisterElectionAPIServer(s grpc.ServiceRegistrar, srv ElectionAPIServer)
- type CancelVoteRequest
- func (*CancelVoteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CancelVoteRequest) GetElectionId() string
- func (*CancelVoteRequest) ProtoMessage()
- func (x *CancelVoteRequest) ProtoReflect() protoreflect.Message
- func (x *CancelVoteRequest) Reset()
- func (x *CancelVoteRequest) String() string
- type CancelVoteResponse
- func (*CancelVoteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CancelVoteResponse) GetSuccess() bool
- func (*CancelVoteResponse) ProtoMessage()
- func (x *CancelVoteResponse) ProtoReflect() protoreflect.Message
- func (x *CancelVoteResponse) Reset()
- func (x *CancelVoteResponse) String() string
- type CandidateVoteRequest
- func (*CandidateVoteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CandidateVoteRequest) GetCandidateId() string
- func (x *CandidateVoteRequest) GetCircleId() string
- func (*CandidateVoteRequest) ProtoMessage()
- func (x *CandidateVoteRequest) ProtoReflect() protoreflect.Message
- func (x *CandidateVoteRequest) Reset()
- func (x *CandidateVoteRequest) String() string
- type CircleElection
- func (*CircleElection) Descriptor() ([]byte, []int)deprecated
- func (x *CircleElection) GetCircleId() string
- func (x *CircleElection) GetCircleMembersCount() int64
- func (x *CircleElection) GetDueTo() *timestamppb.Timestamp
- func (x *CircleElection) GetElected() *CircleNominee
- func (x *CircleElection) GetFinalised() bool
- func (x *CircleElection) GetId() string
- func (x *CircleElection) GetIsSeedHolder() bool
- func (x *CircleElection) GetMaxSeedsVoted() int64
- func (x *CircleElection) GetMembersVoted() int64
- func (x *CircleElection) GetNominees() []*CircleNominee
- func (x *CircleElection) GetSeedsVoted() int64
- func (*CircleElection) ProtoMessage()
- func (x *CircleElection) ProtoReflect() protoreflect.Message
- func (x *CircleElection) Reset()
- func (x *CircleElection) String() string
- type CircleElection_Result
- func (CircleElection_Result) Descriptor() protoreflect.EnumDescriptor
- func (x CircleElection_Result) Enum() *CircleElection_Result
- func (CircleElection_Result) EnumDescriptor() ([]byte, []int)deprecated
- func (x CircleElection_Result) Number() protoreflect.EnumNumber
- func (x CircleElection_Result) String() string
- func (CircleElection_Result) Type() protoreflect.EnumType
- type CircleGov
- func (*CircleGov) Descriptor() ([]byte, []int)deprecated
- func (x *CircleGov) GetCircleId() string
- func (x *CircleGov) GetDirectorId() string
- func (x *CircleGov) GetHolders() []*SeedHolder
- func (x *CircleGov) GetSeedsTotal() int64
- func (x *CircleGov) GetType() CircleGov_Type
- func (*CircleGov) ProtoMessage()
- func (x *CircleGov) ProtoReflect() protoreflect.Message
- func (x *CircleGov) Reset()
- func (x *CircleGov) String() string
- type CircleGov_Type
- func (CircleGov_Type) Descriptor() protoreflect.EnumDescriptor
- func (x CircleGov_Type) Enum() *CircleGov_Type
- func (CircleGov_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x CircleGov_Type) Number() protoreflect.EnumNumber
- func (x CircleGov_Type) String() string
- func (CircleGov_Type) Type() protoreflect.EnumType
- type CircleNominee
- func (*CircleNominee) Descriptor() ([]byte, []int)deprecated
- func (x *CircleNominee) GetUserId() string
- func (x *CircleNominee) GetVotesCount() int64
- func (x *CircleNominee) GetVotesPercent() int64
- func (*CircleNominee) ProtoMessage()
- func (x *CircleNominee) ProtoReflect() protoreflect.Message
- func (x *CircleNominee) Reset()
- func (x *CircleNominee) String() string
- type CircleVote
- func (*CircleVote) Descriptor() ([]byte, []int)deprecated
- func (x *CircleVote) GetCandidateId() string
- func (x *CircleVote) GetCircleId() string
- func (x *CircleVote) GetIsLeading() bool
- func (x *CircleVote) GetMargin() float32
- func (x *CircleVote) GetPosition() int64
- func (x *CircleVote) GetVotes() int64
- func (x *CircleVote) GetVotesPercent() float32
- func (*CircleVote) ProtoMessage()
- func (x *CircleVote) ProtoReflect() protoreflect.Message
- func (x *CircleVote) Reset()
- func (x *CircleVote) String() string
- type CircleVotesRequest
- func (*CircleVotesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CircleVotesRequest) GetCircleId() string
- func (*CircleVotesRequest) ProtoMessage()
- func (x *CircleVotesRequest) ProtoReflect() protoreflect.Message
- func (x *CircleVotesRequest) Reset()
- func (x *CircleVotesRequest) String() string
- type CircleVotesResponse
- func (*CircleVotesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CircleVotesResponse) GetVotes() []*CircleVote
- func (*CircleVotesResponse) ProtoMessage()
- func (x *CircleVotesResponse) ProtoReflect() protoreflect.Message
- func (x *CircleVotesResponse) Reset()
- func (x *CircleVotesResponse) String() string
- type DeleteGovRequest
- type ElectionAPIClient
- type ElectionAPIServer
- type ElectionUserVote
- func (*ElectionUserVote) Descriptor() ([]byte, []int)deprecated
- func (x *ElectionUserVote) GetElectionId() string
- func (x *ElectionUserVote) GetNomineeId() string
- func (x *ElectionUserVote) GetSeedsVoted() int64
- func (x *ElectionUserVote) GetUserId() string
- func (x *ElectionUserVote) GetVotedAt() *timestamppb.Timestamp
- func (*ElectionUserVote) ProtoMessage()
- func (x *ElectionUserVote) ProtoReflect() protoreflect.Message
- func (x *ElectionUserVote) Reset()
- func (x *ElectionUserVote) String() string
- type ElectionVoteRequest
- func (*ElectionVoteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ElectionVoteRequest) GetElectionId() string
- func (x *ElectionVoteRequest) GetNomineeId() string
- func (x *ElectionVoteRequest) GetSeedsVoted() int64
- func (*ElectionVoteRequest) ProtoMessage()
- func (x *ElectionVoteRequest) ProtoReflect() protoreflect.Message
- func (x *ElectionVoteRequest) Reset()
- func (x *ElectionVoteRequest) String() string
- type ElectionVoteResponse
- func (*ElectionVoteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ElectionVoteResponse) GetNominee() *CircleNominee
- func (*ElectionVoteResponse) ProtoMessage()
- func (x *ElectionVoteResponse) ProtoReflect() protoreflect.Message
- func (x *ElectionVoteResponse) Reset()
- func (x *ElectionVoteResponse) String() string
- type Empty
- type FinalizeElectionRequest
- func (*FinalizeElectionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FinalizeElectionRequest) GetElectionId() string
- func (*FinalizeElectionRequest) ProtoMessage()
- func (x *FinalizeElectionRequest) ProtoReflect() protoreflect.Message
- func (x *FinalizeElectionRequest) Reset()
- func (x *FinalizeElectionRequest) String() string
- type FinalizeElectionResponse
- func (*FinalizeElectionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FinalizeElectionResponse) GetElection() *CircleElection
- func (*FinalizeElectionResponse) ProtoMessage()
- func (x *FinalizeElectionResponse) ProtoReflect() protoreflect.Message
- func (x *FinalizeElectionResponse) Reset()
- func (x *FinalizeElectionResponse) String() string
- type GetElectionRequest
- func (*GetElectionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetElectionRequest) GetCircleId() string
- func (*GetElectionRequest) ProtoMessage()
- func (x *GetElectionRequest) ProtoReflect() protoreflect.Message
- func (x *GetElectionRequest) Reset()
- func (x *GetElectionRequest) String() string
- type GetElectionResponse
- func (*GetElectionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetElectionResponse) GetElection() *CircleElection
- func (*GetElectionResponse) ProtoMessage()
- func (x *GetElectionResponse) ProtoReflect() protoreflect.Message
- func (x *GetElectionResponse) Reset()
- func (x *GetElectionResponse) String() string
- type GetElectionUserVoteByCircleRequest
- func (*GetElectionUserVoteByCircleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetElectionUserVoteByCircleRequest) GetCircleId() string
- func (x *GetElectionUserVoteByCircleRequest) GetUserId() string
- func (*GetElectionUserVoteByCircleRequest) ProtoMessage()
- func (x *GetElectionUserVoteByCircleRequest) ProtoReflect() protoreflect.Message
- func (x *GetElectionUserVoteByCircleRequest) Reset()
- func (x *GetElectionUserVoteByCircleRequest) String() string
- type GetElectionUserVoteByCircleResponse
- func (*GetElectionUserVoteByCircleResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetElectionUserVoteByCircleResponse) GetVote() *ElectionUserVote
- func (*GetElectionUserVoteByCircleResponse) ProtoMessage()
- func (x *GetElectionUserVoteByCircleResponse) ProtoReflect() protoreflect.Message
- func (x *GetElectionUserVoteByCircleResponse) Reset()
- func (x *GetElectionUserVoteByCircleResponse) String() string
- type GetGovRequest
- type GetGovResponse
- type InitGovRequest
- func (*InitGovRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InitGovRequest) GetCircleId() string
- func (x *InitGovRequest) GetDirectorId() string
- func (x *InitGovRequest) GetType() CircleGov_Type
- func (*InitGovRequest) ProtoMessage()
- func (x *InitGovRequest) ProtoReflect() protoreflect.Message
- func (x *InitGovRequest) Reset()
- func (x *InitGovRequest) String() string
- type LiftGovRequest
- type SeedHolder
- type TransferVotesRequest
- func (*TransferVotesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TransferVotesRequest) GetAmount() int64
- func (x *TransferVotesRequest) GetCircleId() string
- func (x *TransferVotesRequest) GetUserId() string
- func (*TransferVotesRequest) ProtoMessage()
- func (x *TransferVotesRequest) ProtoReflect() protoreflect.Message
- func (x *TransferVotesRequest) Reset()
- func (x *TransferVotesRequest) String() string
- type UnimplementedElectionAPIServer
- func (UnimplementedElectionAPIServer) CancelVote(context.Context, *CancelVoteRequest) (*CancelVoteResponse, error)
- func (UnimplementedElectionAPIServer) CandidateVote(context.Context, *CandidateVoteRequest) (*CircleVote, error)
- func (UnimplementedElectionAPIServer) CircleVotes(context.Context, *CircleVotesRequest) (*CircleVotesResponse, error)
- func (UnimplementedElectionAPIServer) DeleteCircleGov(context.Context, *DeleteGovRequest) (*Empty, error)
- func (UnimplementedElectionAPIServer) ElectionVote(context.Context, *ElectionVoteRequest) (*ElectionVoteResponse, error)
- func (UnimplementedElectionAPIServer) FinalizeElection(context.Context, *FinalizeElectionRequest) (*FinalizeElectionResponse, error)
- func (UnimplementedElectionAPIServer) GetElection(context.Context, *GetElectionRequest) (*GetElectionResponse, error)
- func (UnimplementedElectionAPIServer) GetElectionUserVoteByCircle(context.Context, *GetElectionUserVoteByCircleRequest) (*GetElectionUserVoteByCircleResponse, error)
- func (UnimplementedElectionAPIServer) GetGovernance(context.Context, *GetGovRequest) (*GetGovResponse, error)
- func (UnimplementedElectionAPIServer) InitCircleGov(context.Context, *InitGovRequest) (*Empty, error)
- func (UnimplementedElectionAPIServer) LiftCircleGov(context.Context, *LiftGovRequest) (*Empty, error)
- func (UnimplementedElectionAPIServer) StartElections(context.Context, *Empty) (*Empty, error)
- func (UnimplementedElectionAPIServer) TransferVotes(context.Context, *TransferVotesRequest) (*Empty, error)
- func (UnimplementedElectionAPIServer) UserVotes(context.Context, *UserVotesRequest) (*UserVotesResponse, error)
- func (UnimplementedElectionAPIServer) Vote(context.Context, *VoteRequest) (*VoteResponse, error)
- type UnsafeElectionAPIServer
- type UserVote
- func (*UserVote) Descriptor() ([]byte, []int)deprecated
- func (x *UserVote) GetCandidateId() string
- func (x *UserVote) GetCircleId() string
- func (x *UserVote) GetIsLeading() bool
- func (x *UserVote) GetMargin() float32
- func (x *UserVote) GetPosition() int64
- func (x *UserVote) GetUserId() string
- func (x *UserVote) GetVotes() int64
- func (x *UserVote) GetVotesPercent() float32
- func (*UserVote) ProtoMessage()
- func (x *UserVote) ProtoReflect() protoreflect.Message
- func (x *UserVote) Reset()
- func (x *UserVote) String() string
- type UserVotesRequest
- func (*UserVotesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserVotesRequest) GetCircleId() string
- func (x *UserVotesRequest) GetUserId() string
- func (*UserVotesRequest) ProtoMessage()
- func (x *UserVotesRequest) ProtoReflect() protoreflect.Message
- func (x *UserVotesRequest) Reset()
- func (x *UserVotesRequest) String() string
- type UserVotesResponse
- func (*UserVotesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserVotesResponse) GetVotes() []*UserVote
- func (*UserVotesResponse) ProtoMessage()
- func (x *UserVotesResponse) ProtoReflect() protoreflect.Message
- func (x *UserVotesResponse) Reset()
- func (x *UserVotesResponse) String() string
- type VoteRequest
- func (*VoteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VoteRequest) GetCandidateId() string
- func (x *VoteRequest) GetCircleId() string
- func (*VoteRequest) ProtoMessage()
- func (x *VoteRequest) ProtoReflect() protoreflect.Message
- func (x *VoteRequest) Reset()
- func (x *VoteRequest) String() string
- type VoteResponse
Constants ¶
This section is empty.
Variables ¶
var ( CircleGov_Type_name = map[int32]string{ 0: "Unknown", 1: "Director", 2: "Democratic", } CircleGov_Type_value = map[string]int32{ "Unknown": 0, "Director": 1, "Democratic": 2, } )
Enum value maps for CircleGov_Type.
var ( CircleElection_Result_name = map[int32]string{ 0: "InProgress", 1: "Elected", 2: "Lifted", 3: "Failed", } CircleElection_Result_value = map[string]int32{ "InProgress": 0, "Elected": 1, "Lifted": 2, "Failed": 3, } )
Enum value maps for CircleElection_Result.
var ElectionAPI_ServiceDesc = grpc.ServiceDesc{ ServiceName: "election_api.v1.ElectionAPI", HandlerType: (*ElectionAPIServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "InitCircleGov", Handler: _ElectionAPI_InitCircleGov_Handler, }, { MethodName: "GetGovernance", Handler: _ElectionAPI_GetGovernance_Handler, }, { MethodName: "StartElections", Handler: _ElectionAPI_StartElections_Handler, }, { MethodName: "GetElection", Handler: _ElectionAPI_GetElection_Handler, }, { MethodName: "ElectionVote", Handler: _ElectionAPI_ElectionVote_Handler, }, { MethodName: "FinalizeElection", Handler: _ElectionAPI_FinalizeElection_Handler, }, { MethodName: "LiftCircleGov", Handler: _ElectionAPI_LiftCircleGov_Handler, }, { MethodName: "DeleteCircleGov", Handler: _ElectionAPI_DeleteCircleGov_Handler, }, { MethodName: "GetElectionUserVoteByCircle", Handler: _ElectionAPI_GetElectionUserVoteByCircle_Handler, }, { MethodName: "CancelVote", Handler: _ElectionAPI_CancelVote_Handler, }, { MethodName: "Vote", Handler: _ElectionAPI_Vote_Handler, }, { MethodName: "UserVotes", Handler: _ElectionAPI_UserVotes_Handler, }, { MethodName: "CircleVotes", Handler: _ElectionAPI_CircleVotes_Handler, }, { MethodName: "CandidateVote", Handler: _ElectionAPI_CandidateVote_Handler, }, { MethodName: "TransferVotes", Handler: _ElectionAPI_TransferVotes_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "election-api/election/v1/election.proto", }
ElectionAPI_ServiceDesc is the grpc.ServiceDesc for ElectionAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_election_api_election_v1_election_proto protoreflect.FileDescriptor
Functions ¶
func RegisterElectionAPIServer ¶
func RegisterElectionAPIServer(s grpc.ServiceRegistrar, srv ElectionAPIServer)
Types ¶
type CancelVoteRequest ¶
type CancelVoteRequest struct { ElectionId string `protobuf:"bytes,1,opt,name=electionId,proto3" json:"electionId,omitempty"` // contains filtered or unexported fields }
func (*CancelVoteRequest) Descriptor
deprecated
func (*CancelVoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use CancelVoteRequest.ProtoReflect.Descriptor instead.
func (*CancelVoteRequest) GetElectionId ¶
func (x *CancelVoteRequest) GetElectionId() string
func (*CancelVoteRequest) ProtoMessage ¶
func (*CancelVoteRequest) ProtoMessage()
func (*CancelVoteRequest) ProtoReflect ¶
func (x *CancelVoteRequest) ProtoReflect() protoreflect.Message
func (*CancelVoteRequest) Reset ¶
func (x *CancelVoteRequest) Reset()
func (*CancelVoteRequest) String ¶
func (x *CancelVoteRequest) String() string
type CancelVoteResponse ¶
type CancelVoteResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*CancelVoteResponse) Descriptor
deprecated
func (*CancelVoteResponse) Descriptor() ([]byte, []int)
Deprecated: Use CancelVoteResponse.ProtoReflect.Descriptor instead.
func (*CancelVoteResponse) GetSuccess ¶
func (x *CancelVoteResponse) GetSuccess() bool
func (*CancelVoteResponse) ProtoMessage ¶
func (*CancelVoteResponse) ProtoMessage()
func (*CancelVoteResponse) ProtoReflect ¶
func (x *CancelVoteResponse) ProtoReflect() protoreflect.Message
func (*CancelVoteResponse) Reset ¶
func (x *CancelVoteResponse) Reset()
func (*CancelVoteResponse) String ¶
func (x *CancelVoteResponse) String() string
type CandidateVoteRequest ¶
type CandidateVoteRequest struct { CircleId string `protobuf:"bytes,1,opt,name=circleId,proto3" json:"circleId,omitempty"` CandidateId string `protobuf:"bytes,2,opt,name=candidateId,proto3" json:"candidateId,omitempty"` // contains filtered or unexported fields }
func (*CandidateVoteRequest) Descriptor
deprecated
func (*CandidateVoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use CandidateVoteRequest.ProtoReflect.Descriptor instead.
func (*CandidateVoteRequest) GetCandidateId ¶
func (x *CandidateVoteRequest) GetCandidateId() string
func (*CandidateVoteRequest) GetCircleId ¶
func (x *CandidateVoteRequest) GetCircleId() string
func (*CandidateVoteRequest) ProtoMessage ¶
func (*CandidateVoteRequest) ProtoMessage()
func (*CandidateVoteRequest) ProtoReflect ¶
func (x *CandidateVoteRequest) ProtoReflect() protoreflect.Message
func (*CandidateVoteRequest) Reset ¶
func (x *CandidateVoteRequest) Reset()
func (*CandidateVoteRequest) String ¶
func (x *CandidateVoteRequest) String() string
type CircleElection ¶
type CircleElection struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CircleId string `protobuf:"bytes,2,opt,name=circleId,proto3" json:"circleId,omitempty"` DueTo *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=dueTo,proto3" json:"dueTo,omitempty"` SeedsVoted int64 `protobuf:"varint,4,opt,name=seedsVoted,proto3" json:"seedsVoted,omitempty"` MembersVoted int64 `protobuf:"varint,5,opt,name=membersVoted,proto3" json:"membersVoted,omitempty"` MaxSeedsVoted int64 `protobuf:"varint,6,opt,name=maxSeedsVoted,proto3" json:"maxSeedsVoted,omitempty"` Finalised bool `protobuf:"varint,7,opt,name=finalised,proto3" json:"finalised,omitempty"` Nominees []*CircleNominee `protobuf:"bytes,8,rep,name=nominees,proto3" json:"nominees,omitempty"` Elected *CircleNominee `protobuf:"bytes,9,opt,name=elected,proto3" json:"elected,omitempty"` CircleMembersCount int64 `protobuf:"varint,10,opt,name=CircleMembersCount,proto3" json:"CircleMembersCount,omitempty"` IsSeedHolder bool `protobuf:"varint,11,opt,name=isSeedHolder,proto3" json:"isSeedHolder,omitempty"` // contains filtered or unexported fields }
func (*CircleElection) Descriptor
deprecated
func (*CircleElection) Descriptor() ([]byte, []int)
Deprecated: Use CircleElection.ProtoReflect.Descriptor instead.
func (*CircleElection) GetCircleId ¶
func (x *CircleElection) GetCircleId() string
func (*CircleElection) GetCircleMembersCount ¶
func (x *CircleElection) GetCircleMembersCount() int64
func (*CircleElection) GetDueTo ¶
func (x *CircleElection) GetDueTo() *timestamppb.Timestamp
func (*CircleElection) GetElected ¶
func (x *CircleElection) GetElected() *CircleNominee
func (*CircleElection) GetFinalised ¶
func (x *CircleElection) GetFinalised() bool
func (*CircleElection) GetId ¶
func (x *CircleElection) GetId() string
func (*CircleElection) GetIsSeedHolder ¶
func (x *CircleElection) GetIsSeedHolder() bool
func (*CircleElection) GetMaxSeedsVoted ¶
func (x *CircleElection) GetMaxSeedsVoted() int64
func (*CircleElection) GetMembersVoted ¶
func (x *CircleElection) GetMembersVoted() int64
func (*CircleElection) GetNominees ¶
func (x *CircleElection) GetNominees() []*CircleNominee
func (*CircleElection) GetSeedsVoted ¶
func (x *CircleElection) GetSeedsVoted() int64
func (*CircleElection) ProtoMessage ¶
func (*CircleElection) ProtoMessage()
func (*CircleElection) ProtoReflect ¶
func (x *CircleElection) ProtoReflect() protoreflect.Message
func (*CircleElection) Reset ¶
func (x *CircleElection) Reset()
func (*CircleElection) String ¶
func (x *CircleElection) String() string
type CircleElection_Result ¶
type CircleElection_Result int32
const ( CircleElection_InProgress CircleElection_Result = 0 CircleElection_Elected CircleElection_Result = 1 CircleElection_Lifted CircleElection_Result = 2 CircleElection_Failed CircleElection_Result = 3 )
func (CircleElection_Result) Descriptor ¶
func (CircleElection_Result) Descriptor() protoreflect.EnumDescriptor
func (CircleElection_Result) Enum ¶
func (x CircleElection_Result) Enum() *CircleElection_Result
func (CircleElection_Result) EnumDescriptor
deprecated
func (CircleElection_Result) EnumDescriptor() ([]byte, []int)
Deprecated: Use CircleElection_Result.Descriptor instead.
func (CircleElection_Result) Number ¶
func (x CircleElection_Result) Number() protoreflect.EnumNumber
func (CircleElection_Result) String ¶
func (x CircleElection_Result) String() string
func (CircleElection_Result) Type ¶
func (CircleElection_Result) Type() protoreflect.EnumType
type CircleGov ¶
type CircleGov struct { CircleId string `protobuf:"bytes,1,opt,name=circleId,proto3" json:"circleId,omitempty"` DirectorId string `protobuf:"bytes,2,opt,name=directorId,proto3" json:"directorId,omitempty"` SeedsTotal int64 `protobuf:"varint,3,opt,name=seedsTotal,proto3" json:"seedsTotal,omitempty"` Type CircleGov_Type `protobuf:"varint,4,opt,name=type,proto3,enum=election_api.v1.CircleGov_Type" json:"type,omitempty"` Holders []*SeedHolder `protobuf:"bytes,5,rep,name=holders,proto3" json:"holders,omitempty"` // contains filtered or unexported fields }
func (*CircleGov) Descriptor
deprecated
func (*CircleGov) GetCircleId ¶
func (*CircleGov) GetDirectorId ¶
func (*CircleGov) GetHolders ¶
func (x *CircleGov) GetHolders() []*SeedHolder
func (*CircleGov) GetSeedsTotal ¶
func (*CircleGov) GetType ¶
func (x *CircleGov) GetType() CircleGov_Type
func (*CircleGov) ProtoMessage ¶
func (*CircleGov) ProtoMessage()
func (*CircleGov) ProtoReflect ¶
func (x *CircleGov) ProtoReflect() protoreflect.Message
type CircleGov_Type ¶
type CircleGov_Type int32
const ( CircleGov_Unknown CircleGov_Type = 0 CircleGov_Director CircleGov_Type = 1 CircleGov_Democratic CircleGov_Type = 2 )
func (CircleGov_Type) Descriptor ¶
func (CircleGov_Type) Descriptor() protoreflect.EnumDescriptor
func (CircleGov_Type) Enum ¶
func (x CircleGov_Type) Enum() *CircleGov_Type
func (CircleGov_Type) EnumDescriptor
deprecated
func (CircleGov_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use CircleGov_Type.Descriptor instead.
func (CircleGov_Type) Number ¶
func (x CircleGov_Type) Number() protoreflect.EnumNumber
func (CircleGov_Type) String ¶
func (x CircleGov_Type) String() string
func (CircleGov_Type) Type ¶
func (CircleGov_Type) Type() protoreflect.EnumType
type CircleNominee ¶
type CircleNominee struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` VotesCount int64 `protobuf:"varint,2,opt,name=votesCount,proto3" json:"votesCount,omitempty"` VotesPercent int64 `protobuf:"varint,3,opt,name=votesPercent,proto3" json:"votesPercent,omitempty"` // contains filtered or unexported fields }
func (*CircleNominee) Descriptor
deprecated
func (*CircleNominee) Descriptor() ([]byte, []int)
Deprecated: Use CircleNominee.ProtoReflect.Descriptor instead.
func (*CircleNominee) GetUserId ¶
func (x *CircleNominee) GetUserId() string
func (*CircleNominee) GetVotesCount ¶
func (x *CircleNominee) GetVotesCount() int64
func (*CircleNominee) GetVotesPercent ¶
func (x *CircleNominee) GetVotesPercent() int64
func (*CircleNominee) ProtoMessage ¶
func (*CircleNominee) ProtoMessage()
func (*CircleNominee) ProtoReflect ¶
func (x *CircleNominee) ProtoReflect() protoreflect.Message
func (*CircleNominee) Reset ¶
func (x *CircleNominee) Reset()
func (*CircleNominee) String ¶
func (x *CircleNominee) String() string
type CircleVote ¶
type CircleVote struct { CircleId string `protobuf:"bytes,1,opt,name=circleId,proto3" json:"circleId,omitempty"` CandidateId string `protobuf:"bytes,2,opt,name=candidateId,proto3" json:"candidateId,omitempty"` Votes int64 `protobuf:"varint,3,opt,name=votes,proto3" json:"votes,omitempty"` VotesPercent float32 `protobuf:"fixed32,4,opt,name=votesPercent,proto3" json:"votesPercent,omitempty"` IsLeading bool `protobuf:"varint,5,opt,name=isLeading,proto3" json:"isLeading,omitempty"` Position int64 `protobuf:"varint,7,opt,name=position,proto3" json:"position,omitempty"` Margin float32 `protobuf:"fixed32,8,opt,name=margin,proto3" json:"margin,omitempty"` // contains filtered or unexported fields }
func (*CircleVote) Descriptor
deprecated
func (*CircleVote) Descriptor() ([]byte, []int)
Deprecated: Use CircleVote.ProtoReflect.Descriptor instead.
func (*CircleVote) GetCandidateId ¶
func (x *CircleVote) GetCandidateId() string
func (*CircleVote) GetCircleId ¶
func (x *CircleVote) GetCircleId() string
func (*CircleVote) GetIsLeading ¶
func (x *CircleVote) GetIsLeading() bool
func (*CircleVote) GetMargin ¶
func (x *CircleVote) GetMargin() float32
func (*CircleVote) GetPosition ¶
func (x *CircleVote) GetPosition() int64
func (*CircleVote) GetVotes ¶
func (x *CircleVote) GetVotes() int64
func (*CircleVote) GetVotesPercent ¶
func (x *CircleVote) GetVotesPercent() float32
func (*CircleVote) ProtoMessage ¶
func (*CircleVote) ProtoMessage()
func (*CircleVote) ProtoReflect ¶
func (x *CircleVote) ProtoReflect() protoreflect.Message
func (*CircleVote) Reset ¶
func (x *CircleVote) Reset()
func (*CircleVote) String ¶
func (x *CircleVote) String() string
type CircleVotesRequest ¶
type CircleVotesRequest struct { CircleId string `protobuf:"bytes,1,opt,name=circleId,proto3" json:"circleId,omitempty"` // contains filtered or unexported fields }
func (*CircleVotesRequest) Descriptor
deprecated
func (*CircleVotesRequest) Descriptor() ([]byte, []int)
Deprecated: Use CircleVotesRequest.ProtoReflect.Descriptor instead.
func (*CircleVotesRequest) GetCircleId ¶
func (x *CircleVotesRequest) GetCircleId() string
func (*CircleVotesRequest) ProtoMessage ¶
func (*CircleVotesRequest) ProtoMessage()
func (*CircleVotesRequest) ProtoReflect ¶
func (x *CircleVotesRequest) ProtoReflect() protoreflect.Message
func (*CircleVotesRequest) Reset ¶
func (x *CircleVotesRequest) Reset()
func (*CircleVotesRequest) String ¶
func (x *CircleVotesRequest) String() string
type CircleVotesResponse ¶
type CircleVotesResponse struct { Votes []*CircleVote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"` // contains filtered or unexported fields }
func (*CircleVotesResponse) Descriptor
deprecated
func (*CircleVotesResponse) Descriptor() ([]byte, []int)
Deprecated: Use CircleVotesResponse.ProtoReflect.Descriptor instead.
func (*CircleVotesResponse) GetVotes ¶
func (x *CircleVotesResponse) GetVotes() []*CircleVote
func (*CircleVotesResponse) ProtoMessage ¶
func (*CircleVotesResponse) ProtoMessage()
func (*CircleVotesResponse) ProtoReflect ¶
func (x *CircleVotesResponse) ProtoReflect() protoreflect.Message
func (*CircleVotesResponse) Reset ¶
func (x *CircleVotesResponse) Reset()
func (*CircleVotesResponse) String ¶
func (x *CircleVotesResponse) String() string
type DeleteGovRequest ¶
type DeleteGovRequest struct { CircleId string `protobuf:"bytes,1,opt,name=circleId,proto3" json:"circleId,omitempty"` // contains filtered or unexported fields }
func (*DeleteGovRequest) Descriptor
deprecated
func (*DeleteGovRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteGovRequest.ProtoReflect.Descriptor instead.
func (*DeleteGovRequest) GetCircleId ¶
func (x *DeleteGovRequest) GetCircleId() string
func (*DeleteGovRequest) ProtoMessage ¶
func (*DeleteGovRequest) ProtoMessage()
func (*DeleteGovRequest) ProtoReflect ¶
func (x *DeleteGovRequest) ProtoReflect() protoreflect.Message
func (*DeleteGovRequest) Reset ¶
func (x *DeleteGovRequest) Reset()
func (*DeleteGovRequest) String ¶
func (x *DeleteGovRequest) String() string
type ElectionAPIClient ¶
type ElectionAPIClient interface { InitCircleGov(ctx context.Context, in *InitGovRequest, opts ...grpc.CallOption) (*Empty, error) GetGovernance(ctx context.Context, in *GetGovRequest, opts ...grpc.CallOption) (*GetGovResponse, error) StartElections(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) GetElection(ctx context.Context, in *GetElectionRequest, opts ...grpc.CallOption) (*GetElectionResponse, error) ElectionVote(ctx context.Context, in *ElectionVoteRequest, opts ...grpc.CallOption) (*ElectionVoteResponse, error) FinalizeElection(ctx context.Context, in *FinalizeElectionRequest, opts ...grpc.CallOption) (*FinalizeElectionResponse, error) LiftCircleGov(ctx context.Context, in *LiftGovRequest, opts ...grpc.CallOption) (*Empty, error) DeleteCircleGov(ctx context.Context, in *DeleteGovRequest, opts ...grpc.CallOption) (*Empty, error) GetElectionUserVoteByCircle(ctx context.Context, in *GetElectionUserVoteByCircleRequest, opts ...grpc.CallOption) (*GetElectionUserVoteByCircleResponse, error) CancelVote(ctx context.Context, in *CancelVoteRequest, opts ...grpc.CallOption) (*CancelVoteResponse, error) Vote(ctx context.Context, in *VoteRequest, opts ...grpc.CallOption) (*VoteResponse, error) UserVotes(ctx context.Context, in *UserVotesRequest, opts ...grpc.CallOption) (*UserVotesResponse, error) CircleVotes(ctx context.Context, in *CircleVotesRequest, opts ...grpc.CallOption) (*CircleVotesResponse, error) CandidateVote(ctx context.Context, in *CandidateVoteRequest, opts ...grpc.CallOption) (*CircleVote, error) TransferVotes(ctx context.Context, in *TransferVotesRequest, opts ...grpc.CallOption) (*Empty, error) }
ElectionAPIClient is the client API for ElectionAPI 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 NewElectionAPIClient ¶
func NewElectionAPIClient(cc grpc.ClientConnInterface) ElectionAPIClient
type ElectionAPIServer ¶
type ElectionAPIServer interface { InitCircleGov(context.Context, *InitGovRequest) (*Empty, error) GetGovernance(context.Context, *GetGovRequest) (*GetGovResponse, error) StartElections(context.Context, *Empty) (*Empty, error) GetElection(context.Context, *GetElectionRequest) (*GetElectionResponse, error) ElectionVote(context.Context, *ElectionVoteRequest) (*ElectionVoteResponse, error) FinalizeElection(context.Context, *FinalizeElectionRequest) (*FinalizeElectionResponse, error) LiftCircleGov(context.Context, *LiftGovRequest) (*Empty, error) DeleteCircleGov(context.Context, *DeleteGovRequest) (*Empty, error) GetElectionUserVoteByCircle(context.Context, *GetElectionUserVoteByCircleRequest) (*GetElectionUserVoteByCircleResponse, error) CancelVote(context.Context, *CancelVoteRequest) (*CancelVoteResponse, error) Vote(context.Context, *VoteRequest) (*VoteResponse, error) UserVotes(context.Context, *UserVotesRequest) (*UserVotesResponse, error) CircleVotes(context.Context, *CircleVotesRequest) (*CircleVotesResponse, error) CandidateVote(context.Context, *CandidateVoteRequest) (*CircleVote, error) TransferVotes(context.Context, *TransferVotesRequest) (*Empty, error) // contains filtered or unexported methods }
ElectionAPIServer is the server API for ElectionAPI service. All implementations must embed UnimplementedElectionAPIServer for forward compatibility
type ElectionUserVote ¶
type ElectionUserVote struct { ElectionId string `protobuf:"bytes,1,opt,name=electionId,proto3" json:"electionId,omitempty"` UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` VotedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=votedAt,proto3" json:"votedAt,omitempty"` NomineeId string `protobuf:"bytes,4,opt,name=nomineeId,proto3" json:"nomineeId,omitempty"` SeedsVoted int64 `protobuf:"varint,5,opt,name=seedsVoted,proto3" json:"seedsVoted,omitempty"` // contains filtered or unexported fields }
func (*ElectionUserVote) Descriptor
deprecated
func (*ElectionUserVote) Descriptor() ([]byte, []int)
Deprecated: Use ElectionUserVote.ProtoReflect.Descriptor instead.
func (*ElectionUserVote) GetElectionId ¶
func (x *ElectionUserVote) GetElectionId() string
func (*ElectionUserVote) GetNomineeId ¶
func (x *ElectionUserVote) GetNomineeId() string
func (*ElectionUserVote) GetSeedsVoted ¶
func (x *ElectionUserVote) GetSeedsVoted() int64
func (*ElectionUserVote) GetUserId ¶
func (x *ElectionUserVote) GetUserId() string
func (*ElectionUserVote) GetVotedAt ¶
func (x *ElectionUserVote) GetVotedAt() *timestamppb.Timestamp
func (*ElectionUserVote) ProtoMessage ¶
func (*ElectionUserVote) ProtoMessage()
func (*ElectionUserVote) ProtoReflect ¶
func (x *ElectionUserVote) ProtoReflect() protoreflect.Message
func (*ElectionUserVote) Reset ¶
func (x *ElectionUserVote) Reset()
func (*ElectionUserVote) String ¶
func (x *ElectionUserVote) String() string
type ElectionVoteRequest ¶
type ElectionVoteRequest struct { ElectionId string `protobuf:"bytes,1,opt,name=electionId,proto3" json:"electionId,omitempty"` NomineeId string `protobuf:"bytes,2,opt,name=nomineeId,proto3" json:"nomineeId,omitempty"` SeedsVoted int64 `protobuf:"varint,3,opt,name=seedsVoted,proto3" json:"seedsVoted,omitempty"` // contains filtered or unexported fields }
func (*ElectionVoteRequest) Descriptor
deprecated
func (*ElectionVoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use ElectionVoteRequest.ProtoReflect.Descriptor instead.
func (*ElectionVoteRequest) GetElectionId ¶
func (x *ElectionVoteRequest) GetElectionId() string
func (*ElectionVoteRequest) GetNomineeId ¶
func (x *ElectionVoteRequest) GetNomineeId() string
func (*ElectionVoteRequest) GetSeedsVoted ¶
func (x *ElectionVoteRequest) GetSeedsVoted() int64
func (*ElectionVoteRequest) ProtoMessage ¶
func (*ElectionVoteRequest) ProtoMessage()
func (*ElectionVoteRequest) ProtoReflect ¶
func (x *ElectionVoteRequest) ProtoReflect() protoreflect.Message
func (*ElectionVoteRequest) Reset ¶
func (x *ElectionVoteRequest) Reset()
func (*ElectionVoteRequest) String ¶
func (x *ElectionVoteRequest) String() string
type ElectionVoteResponse ¶
type ElectionVoteResponse struct { Nominee *CircleNominee `protobuf:"bytes,1,opt,name=nominee,proto3" json:"nominee,omitempty"` // contains filtered or unexported fields }
func (*ElectionVoteResponse) Descriptor
deprecated
func (*ElectionVoteResponse) Descriptor() ([]byte, []int)
Deprecated: Use ElectionVoteResponse.ProtoReflect.Descriptor instead.
func (*ElectionVoteResponse) GetNominee ¶
func (x *ElectionVoteResponse) GetNominee() *CircleNominee
func (*ElectionVoteResponse) ProtoMessage ¶
func (*ElectionVoteResponse) ProtoMessage()
func (*ElectionVoteResponse) ProtoReflect ¶
func (x *ElectionVoteResponse) ProtoReflect() protoreflect.Message
func (*ElectionVoteResponse) Reset ¶
func (x *ElectionVoteResponse) Reset()
func (*ElectionVoteResponse) String ¶
func (x *ElectionVoteResponse) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type FinalizeElectionRequest ¶
type FinalizeElectionRequest struct { ElectionId string `protobuf:"bytes,1,opt,name=electionId,proto3" json:"electionId,omitempty"` // contains filtered or unexported fields }
func (*FinalizeElectionRequest) Descriptor
deprecated
func (*FinalizeElectionRequest) Descriptor() ([]byte, []int)
Deprecated: Use FinalizeElectionRequest.ProtoReflect.Descriptor instead.
func (*FinalizeElectionRequest) GetElectionId ¶
func (x *FinalizeElectionRequest) GetElectionId() string
func (*FinalizeElectionRequest) ProtoMessage ¶
func (*FinalizeElectionRequest) ProtoMessage()
func (*FinalizeElectionRequest) ProtoReflect ¶
func (x *FinalizeElectionRequest) ProtoReflect() protoreflect.Message
func (*FinalizeElectionRequest) Reset ¶
func (x *FinalizeElectionRequest) Reset()
func (*FinalizeElectionRequest) String ¶
func (x *FinalizeElectionRequest) String() string
type FinalizeElectionResponse ¶
type FinalizeElectionResponse struct { Election *CircleElection `protobuf:"bytes,1,opt,name=election,proto3" json:"election,omitempty"` // contains filtered or unexported fields }
func (*FinalizeElectionResponse) Descriptor
deprecated
func (*FinalizeElectionResponse) Descriptor() ([]byte, []int)
Deprecated: Use FinalizeElectionResponse.ProtoReflect.Descriptor instead.
func (*FinalizeElectionResponse) GetElection ¶
func (x *FinalizeElectionResponse) GetElection() *CircleElection
func (*FinalizeElectionResponse) ProtoMessage ¶
func (*FinalizeElectionResponse) ProtoMessage()
func (*FinalizeElectionResponse) ProtoReflect ¶
func (x *FinalizeElectionResponse) ProtoReflect() protoreflect.Message
func (*FinalizeElectionResponse) Reset ¶
func (x *FinalizeElectionResponse) Reset()
func (*FinalizeElectionResponse) String ¶
func (x *FinalizeElectionResponse) String() string
type GetElectionRequest ¶
type GetElectionRequest struct { CircleId string `protobuf:"bytes,1,opt,name=circleId,proto3" json:"circleId,omitempty"` // contains filtered or unexported fields }
func (*GetElectionRequest) Descriptor
deprecated
func (*GetElectionRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetElectionRequest.ProtoReflect.Descriptor instead.
func (*GetElectionRequest) GetCircleId ¶
func (x *GetElectionRequest) GetCircleId() string
func (*GetElectionRequest) ProtoMessage ¶
func (*GetElectionRequest) ProtoMessage()
func (*GetElectionRequest) ProtoReflect ¶
func (x *GetElectionRequest) ProtoReflect() protoreflect.Message
func (*GetElectionRequest) Reset ¶
func (x *GetElectionRequest) Reset()
func (*GetElectionRequest) String ¶
func (x *GetElectionRequest) String() string
type GetElectionResponse ¶
type GetElectionResponse struct { Election *CircleElection `protobuf:"bytes,1,opt,name=election,proto3" json:"election,omitempty"` // contains filtered or unexported fields }
func (*GetElectionResponse) Descriptor
deprecated
func (*GetElectionResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetElectionResponse.ProtoReflect.Descriptor instead.
func (*GetElectionResponse) GetElection ¶
func (x *GetElectionResponse) GetElection() *CircleElection
func (*GetElectionResponse) ProtoMessage ¶
func (*GetElectionResponse) ProtoMessage()
func (*GetElectionResponse) ProtoReflect ¶
func (x *GetElectionResponse) ProtoReflect() protoreflect.Message
func (*GetElectionResponse) Reset ¶
func (x *GetElectionResponse) Reset()
func (*GetElectionResponse) String ¶
func (x *GetElectionResponse) String() string
type GetElectionUserVoteByCircleRequest ¶
type GetElectionUserVoteByCircleRequest struct { CircleId string `protobuf:"bytes,1,opt,name=circleId,proto3" json:"circleId,omitempty"` UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` // contains filtered or unexported fields }
func (*GetElectionUserVoteByCircleRequest) Descriptor
deprecated
func (*GetElectionUserVoteByCircleRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetElectionUserVoteByCircleRequest.ProtoReflect.Descriptor instead.
func (*GetElectionUserVoteByCircleRequest) GetCircleId ¶
func (x *GetElectionUserVoteByCircleRequest) GetCircleId() string
func (*GetElectionUserVoteByCircleRequest) GetUserId ¶
func (x *GetElectionUserVoteByCircleRequest) GetUserId() string
func (*GetElectionUserVoteByCircleRequest) ProtoMessage ¶
func (*GetElectionUserVoteByCircleRequest) ProtoMessage()
func (*GetElectionUserVoteByCircleRequest) ProtoReflect ¶
func (x *GetElectionUserVoteByCircleRequest) ProtoReflect() protoreflect.Message
func (*GetElectionUserVoteByCircleRequest) Reset ¶
func (x *GetElectionUserVoteByCircleRequest) Reset()
func (*GetElectionUserVoteByCircleRequest) String ¶
func (x *GetElectionUserVoteByCircleRequest) String() string
type GetElectionUserVoteByCircleResponse ¶
type GetElectionUserVoteByCircleResponse struct { Vote *ElectionUserVote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` // contains filtered or unexported fields }
func (*GetElectionUserVoteByCircleResponse) Descriptor
deprecated
func (*GetElectionUserVoteByCircleResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetElectionUserVoteByCircleResponse.ProtoReflect.Descriptor instead.
func (*GetElectionUserVoteByCircleResponse) GetVote ¶
func (x *GetElectionUserVoteByCircleResponse) GetVote() *ElectionUserVote
func (*GetElectionUserVoteByCircleResponse) ProtoMessage ¶
func (*GetElectionUserVoteByCircleResponse) ProtoMessage()
func (*GetElectionUserVoteByCircleResponse) ProtoReflect ¶
func (x *GetElectionUserVoteByCircleResponse) ProtoReflect() protoreflect.Message
func (*GetElectionUserVoteByCircleResponse) Reset ¶
func (x *GetElectionUserVoteByCircleResponse) Reset()
func (*GetElectionUserVoteByCircleResponse) String ¶
func (x *GetElectionUserVoteByCircleResponse) String() string
type GetGovRequest ¶
type GetGovRequest struct { CircleId string `protobuf:"bytes,1,opt,name=circleId,proto3" json:"circleId,omitempty"` // contains filtered or unexported fields }
func (*GetGovRequest) Descriptor
deprecated
func (*GetGovRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetGovRequest.ProtoReflect.Descriptor instead.
func (*GetGovRequest) GetCircleId ¶
func (x *GetGovRequest) GetCircleId() string
func (*GetGovRequest) ProtoMessage ¶
func (*GetGovRequest) ProtoMessage()
func (*GetGovRequest) ProtoReflect ¶
func (x *GetGovRequest) ProtoReflect() protoreflect.Message
func (*GetGovRequest) Reset ¶
func (x *GetGovRequest) Reset()
func (*GetGovRequest) String ¶
func (x *GetGovRequest) String() string
type GetGovResponse ¶
type GetGovResponse struct { Gov *CircleGov `protobuf:"bytes,1,opt,name=gov,proto3" json:"gov,omitempty"` // contains filtered or unexported fields }
func (*GetGovResponse) Descriptor
deprecated
func (*GetGovResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetGovResponse.ProtoReflect.Descriptor instead.
func (*GetGovResponse) GetGov ¶
func (x *GetGovResponse) GetGov() *CircleGov
func (*GetGovResponse) ProtoMessage ¶
func (*GetGovResponse) ProtoMessage()
func (*GetGovResponse) ProtoReflect ¶
func (x *GetGovResponse) ProtoReflect() protoreflect.Message
func (*GetGovResponse) Reset ¶
func (x *GetGovResponse) Reset()
func (*GetGovResponse) String ¶
func (x *GetGovResponse) String() string
type InitGovRequest ¶
type InitGovRequest struct { CircleId string `protobuf:"bytes,1,opt,name=circleId,proto3" json:"circleId,omitempty"` DirectorId string `protobuf:"bytes,2,opt,name=directorId,proto3" json:"directorId,omitempty"` Type CircleGov_Type `protobuf:"varint,3,opt,name=type,proto3,enum=election_api.v1.CircleGov_Type" json:"type,omitempty"` // contains filtered or unexported fields }
func (*InitGovRequest) Descriptor
deprecated
func (*InitGovRequest) Descriptor() ([]byte, []int)
Deprecated: Use InitGovRequest.ProtoReflect.Descriptor instead.
func (*InitGovRequest) GetCircleId ¶
func (x *InitGovRequest) GetCircleId() string
func (*InitGovRequest) GetDirectorId ¶
func (x *InitGovRequest) GetDirectorId() string
func (*InitGovRequest) GetType ¶
func (x *InitGovRequest) GetType() CircleGov_Type
func (*InitGovRequest) ProtoMessage ¶
func (*InitGovRequest) ProtoMessage()
func (*InitGovRequest) ProtoReflect ¶
func (x *InitGovRequest) ProtoReflect() protoreflect.Message
func (*InitGovRequest) Reset ¶
func (x *InitGovRequest) Reset()
func (*InitGovRequest) String ¶
func (x *InitGovRequest) String() string
type LiftGovRequest ¶
type LiftGovRequest struct { CircleId string `protobuf:"bytes,1,opt,name=circleId,proto3" json:"circleId,omitempty"` // contains filtered or unexported fields }
func (*LiftGovRequest) Descriptor
deprecated
func (*LiftGovRequest) Descriptor() ([]byte, []int)
Deprecated: Use LiftGovRequest.ProtoReflect.Descriptor instead.
func (*LiftGovRequest) GetCircleId ¶
func (x *LiftGovRequest) GetCircleId() string
func (*LiftGovRequest) ProtoMessage ¶
func (*LiftGovRequest) ProtoMessage()
func (*LiftGovRequest) ProtoReflect ¶
func (x *LiftGovRequest) ProtoReflect() protoreflect.Message
func (*LiftGovRequest) Reset ¶
func (x *LiftGovRequest) Reset()
func (*LiftGovRequest) String ¶
func (x *LiftGovRequest) String() string
type SeedHolder ¶
type SeedHolder struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*SeedHolder) Descriptor
deprecated
func (*SeedHolder) Descriptor() ([]byte, []int)
Deprecated: Use SeedHolder.ProtoReflect.Descriptor instead.
func (*SeedHolder) GetAmount ¶
func (x *SeedHolder) GetAmount() int64
func (*SeedHolder) GetUserId ¶
func (x *SeedHolder) GetUserId() string
func (*SeedHolder) ProtoMessage ¶
func (*SeedHolder) ProtoMessage()
func (*SeedHolder) ProtoReflect ¶
func (x *SeedHolder) ProtoReflect() protoreflect.Message
func (*SeedHolder) Reset ¶
func (x *SeedHolder) Reset()
func (*SeedHolder) String ¶
func (x *SeedHolder) String() string
type TransferVotesRequest ¶
type TransferVotesRequest struct { CircleId string `protobuf:"bytes,1,opt,name=circleId,proto3" json:"circleId,omitempty"` UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*TransferVotesRequest) Descriptor
deprecated
func (*TransferVotesRequest) Descriptor() ([]byte, []int)
Deprecated: Use TransferVotesRequest.ProtoReflect.Descriptor instead.
func (*TransferVotesRequest) GetAmount ¶
func (x *TransferVotesRequest) GetAmount() int64
func (*TransferVotesRequest) GetCircleId ¶
func (x *TransferVotesRequest) GetCircleId() string
func (*TransferVotesRequest) GetUserId ¶
func (x *TransferVotesRequest) GetUserId() string
func (*TransferVotesRequest) ProtoMessage ¶
func (*TransferVotesRequest) ProtoMessage()
func (*TransferVotesRequest) ProtoReflect ¶
func (x *TransferVotesRequest) ProtoReflect() protoreflect.Message
func (*TransferVotesRequest) Reset ¶
func (x *TransferVotesRequest) Reset()
func (*TransferVotesRequest) String ¶
func (x *TransferVotesRequest) String() string
type UnimplementedElectionAPIServer ¶
type UnimplementedElectionAPIServer struct { }
UnimplementedElectionAPIServer must be embedded to have forward compatible implementations.
func (UnimplementedElectionAPIServer) CancelVote ¶
func (UnimplementedElectionAPIServer) CancelVote(context.Context, *CancelVoteRequest) (*CancelVoteResponse, error)
func (UnimplementedElectionAPIServer) CandidateVote ¶
func (UnimplementedElectionAPIServer) CandidateVote(context.Context, *CandidateVoteRequest) (*CircleVote, error)
func (UnimplementedElectionAPIServer) CircleVotes ¶
func (UnimplementedElectionAPIServer) CircleVotes(context.Context, *CircleVotesRequest) (*CircleVotesResponse, error)
func (UnimplementedElectionAPIServer) DeleteCircleGov ¶
func (UnimplementedElectionAPIServer) DeleteCircleGov(context.Context, *DeleteGovRequest) (*Empty, error)
func (UnimplementedElectionAPIServer) ElectionVote ¶
func (UnimplementedElectionAPIServer) ElectionVote(context.Context, *ElectionVoteRequest) (*ElectionVoteResponse, error)
func (UnimplementedElectionAPIServer) FinalizeElection ¶
func (UnimplementedElectionAPIServer) FinalizeElection(context.Context, *FinalizeElectionRequest) (*FinalizeElectionResponse, error)
func (UnimplementedElectionAPIServer) GetElection ¶
func (UnimplementedElectionAPIServer) GetElection(context.Context, *GetElectionRequest) (*GetElectionResponse, error)
func (UnimplementedElectionAPIServer) GetElectionUserVoteByCircle ¶
func (UnimplementedElectionAPIServer) GetElectionUserVoteByCircle(context.Context, *GetElectionUserVoteByCircleRequest) (*GetElectionUserVoteByCircleResponse, error)
func (UnimplementedElectionAPIServer) GetGovernance ¶
func (UnimplementedElectionAPIServer) GetGovernance(context.Context, *GetGovRequest) (*GetGovResponse, error)
func (UnimplementedElectionAPIServer) InitCircleGov ¶
func (UnimplementedElectionAPIServer) InitCircleGov(context.Context, *InitGovRequest) (*Empty, error)
func (UnimplementedElectionAPIServer) LiftCircleGov ¶
func (UnimplementedElectionAPIServer) LiftCircleGov(context.Context, *LiftGovRequest) (*Empty, error)
func (UnimplementedElectionAPIServer) StartElections ¶
func (UnimplementedElectionAPIServer) TransferVotes ¶
func (UnimplementedElectionAPIServer) TransferVotes(context.Context, *TransferVotesRequest) (*Empty, error)
func (UnimplementedElectionAPIServer) UserVotes ¶
func (UnimplementedElectionAPIServer) UserVotes(context.Context, *UserVotesRequest) (*UserVotesResponse, error)
func (UnimplementedElectionAPIServer) Vote ¶
func (UnimplementedElectionAPIServer) Vote(context.Context, *VoteRequest) (*VoteResponse, error)
type UnsafeElectionAPIServer ¶
type UnsafeElectionAPIServer interface {
// contains filtered or unexported methods
}
UnsafeElectionAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ElectionAPIServer will result in compilation errors.
type UserVote ¶
type UserVote struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` CircleId string `protobuf:"bytes,2,opt,name=circleId,proto3" json:"circleId,omitempty"` CandidateId string `protobuf:"bytes,3,opt,name=candidateId,proto3" json:"candidateId,omitempty"` Votes int64 `protobuf:"varint,4,opt,name=votes,proto3" json:"votes,omitempty"` VotesPercent float32 `protobuf:"fixed32,5,opt,name=votesPercent,proto3" json:"votesPercent,omitempty"` IsLeading bool `protobuf:"varint,6,opt,name=isLeading,proto3" json:"isLeading,omitempty"` Position int64 `protobuf:"varint,7,opt,name=position,proto3" json:"position,omitempty"` Margin float32 `protobuf:"fixed32,8,opt,name=margin,proto3" json:"margin,omitempty"` // contains filtered or unexported fields }
func (*UserVote) Descriptor
deprecated
func (*UserVote) GetCandidateId ¶
func (*UserVote) GetCircleId ¶
func (*UserVote) GetIsLeading ¶
func (*UserVote) GetPosition ¶
func (*UserVote) GetVotesPercent ¶
func (*UserVote) ProtoMessage ¶
func (*UserVote) ProtoMessage()
func (*UserVote) ProtoReflect ¶
func (x *UserVote) ProtoReflect() protoreflect.Message
type UserVotesRequest ¶
type UserVotesRequest struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` CircleId *string `protobuf:"bytes,2,opt,name=circleId,proto3,oneof" json:"circleId,omitempty"` // contains filtered or unexported fields }
func (*UserVotesRequest) Descriptor
deprecated
func (*UserVotesRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserVotesRequest.ProtoReflect.Descriptor instead.
func (*UserVotesRequest) GetCircleId ¶
func (x *UserVotesRequest) GetCircleId() string
func (*UserVotesRequest) GetUserId ¶
func (x *UserVotesRequest) GetUserId() string
func (*UserVotesRequest) ProtoMessage ¶
func (*UserVotesRequest) ProtoMessage()
func (*UserVotesRequest) ProtoReflect ¶
func (x *UserVotesRequest) ProtoReflect() protoreflect.Message
func (*UserVotesRequest) Reset ¶
func (x *UserVotesRequest) Reset()
func (*UserVotesRequest) String ¶
func (x *UserVotesRequest) String() string
type UserVotesResponse ¶
type UserVotesResponse struct { Votes []*UserVote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"` // contains filtered or unexported fields }
func (*UserVotesResponse) Descriptor
deprecated
func (*UserVotesResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserVotesResponse.ProtoReflect.Descriptor instead.
func (*UserVotesResponse) GetVotes ¶
func (x *UserVotesResponse) GetVotes() []*UserVote
func (*UserVotesResponse) ProtoMessage ¶
func (*UserVotesResponse) ProtoMessage()
func (*UserVotesResponse) ProtoReflect ¶
func (x *UserVotesResponse) ProtoReflect() protoreflect.Message
func (*UserVotesResponse) Reset ¶
func (x *UserVotesResponse) Reset()
func (*UserVotesResponse) String ¶
func (x *UserVotesResponse) String() string
type VoteRequest ¶
type VoteRequest struct { CircleId string `protobuf:"bytes,1,opt,name=circleId,proto3" json:"circleId,omitempty"` CandidateId string `protobuf:"bytes,2,opt,name=candidateId,proto3" json:"candidateId,omitempty"` // contains filtered or unexported fields }
func (*VoteRequest) Descriptor
deprecated
func (*VoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use VoteRequest.ProtoReflect.Descriptor instead.
func (*VoteRequest) GetCandidateId ¶
func (x *VoteRequest) GetCandidateId() string
func (*VoteRequest) GetCircleId ¶
func (x *VoteRequest) GetCircleId() 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 { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*VoteResponse) Descriptor
deprecated
func (*VoteResponse) Descriptor() ([]byte, []int)
Deprecated: Use VoteResponse.ProtoReflect.Descriptor instead.
func (*VoteResponse) GetSuccess ¶
func (x *VoteResponse) GetSuccess() bool
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