v1

package
v0.3.54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
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)

View Source
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) Enum

func (CircleElection_Result) EnumDescriptor deprecated

func (CircleElection_Result) EnumDescriptor() ([]byte, []int)

Deprecated: Use CircleElection_Result.Descriptor instead.

func (CircleElection_Result) Number

func (CircleElection_Result) String

func (x CircleElection_Result) String() string

func (CircleElection_Result) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use CircleGov.ProtoReflect.Descriptor instead.

func (*CircleGov) GetCircleId

func (x *CircleGov) GetCircleId() string

func (*CircleGov) GetDirectorId

func (x *CircleGov) GetDirectorId() string

func (*CircleGov) GetHolders

func (x *CircleGov) GetHolders() []*SeedHolder

func (*CircleGov) GetSeedsTotal

func (x *CircleGov) GetSeedsTotal() int64

func (*CircleGov) GetType

func (x *CircleGov) GetType() CircleGov_Type

func (*CircleGov) ProtoMessage

func (*CircleGov) ProtoMessage()

func (*CircleGov) ProtoReflect

func (x *CircleGov) ProtoReflect() protoreflect.Message

func (*CircleGov) Reset

func (x *CircleGov) Reset()

func (*CircleGov) String

func (x *CircleGov) String() string

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) 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 (CircleGov_Type) String

func (x CircleGov_Type) String() string

func (CircleGov_Type) Type

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.

type ElectionAPIServer

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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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 (*GetElectionUserVoteByCircleRequest) ProtoMessage

func (*GetElectionUserVoteByCircleRequest) ProtoMessage()

func (*GetElectionUserVoteByCircleRequest) ProtoReflect

func (*GetElectionUserVoteByCircleRequest) Reset

func (*GetElectionUserVoteByCircleRequest) 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 (*GetElectionUserVoteByCircleResponse) ProtoMessage

func (*GetElectionUserVoteByCircleResponse) ProtoMessage()

func (*GetElectionUserVoteByCircleResponse) ProtoReflect

func (*GetElectionUserVoteByCircleResponse) Reset

func (*GetElectionUserVoteByCircleResponse) 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) CandidateVote

func (UnimplementedElectionAPIServer) CircleVotes

func (UnimplementedElectionAPIServer) DeleteCircleGov

func (UnimplementedElectionAPIServer) ElectionVote

func (UnimplementedElectionAPIServer) FinalizeElection

func (UnimplementedElectionAPIServer) GetElection

func (UnimplementedElectionAPIServer) GetGovernance

func (UnimplementedElectionAPIServer) InitCircleGov

func (UnimplementedElectionAPIServer) LiftCircleGov

func (UnimplementedElectionAPIServer) StartElections

func (UnimplementedElectionAPIServer) TransferVotes

func (UnimplementedElectionAPIServer) UserVotes

func (UnimplementedElectionAPIServer) Vote

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) Descriptor() ([]byte, []int)

Deprecated: Use UserVote.ProtoReflect.Descriptor instead.

func (*UserVote) GetCandidateId

func (x *UserVote) GetCandidateId() string

func (*UserVote) GetCircleId

func (x *UserVote) GetCircleId() string

func (*UserVote) GetIsLeading

func (x *UserVote) GetIsLeading() bool

func (*UserVote) GetMargin

func (x *UserVote) GetMargin() float32

func (*UserVote) GetPosition

func (x *UserVote) GetPosition() int64

func (*UserVote) GetUserId

func (x *UserVote) GetUserId() string

func (*UserVote) GetVotes

func (x *UserVote) GetVotes() int64

func (*UserVote) GetVotesPercent

func (x *UserVote) GetVotesPercent() float32

func (*UserVote) ProtoMessage

func (*UserVote) ProtoMessage()

func (*UserVote) ProtoReflect

func (x *UserVote) ProtoReflect() protoreflect.Message

func (*UserVote) Reset

func (x *UserVote) Reset()

func (*UserVote) String

func (x *UserVote) String() string

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

Directories

Path Synopsis
Package election_mock is a generated GoMock package.
Package election_mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL