tenvis

package module
v0.0.0-...-8a69d85 Latest Latest
Warning

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

Go to latest
Published: May 25, 2019 License: MIT Imports: 22 Imported by: 0

README

Tenvis

Simple blockchain voting system based on SCP

Just for fun educational purposes.

Documentation

Overview

Package tenvis is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	VotingKey       = "voting"
	VotingSerialKey = "voting_serial"
	LedgersKey      = "ledgers"
	LedgerSerialKey = "ledger_serial"
)

Variables

View Source
var SCPMessage_Type_name = map[int32]string{
	0: "UNKNOWN",
	1: "VOTE_NOMINATE",
	2: "ACCEPT_NOMINATE",
	3: "VOTE_PREPARE",
	4: "ACCEPT_PREPARE",
	5: "VOTE_COMMIT",
	6: "ACCEPT_COMMIT",
}
View Source
var SCPMessage_Type_value = map[string]int32{
	"UNKNOWN":         0,
	"VOTE_NOMINATE":   1,
	"ACCEPT_NOMINATE": 2,
	"VOTE_PREPARE":    3,
	"ACCEPT_PREPARE":  4,
	"VOTE_COMMIT":     5,
	"ACCEPT_COMMIT":   6,
}

Functions

func RegisterTenvisHandler

func RegisterTenvisHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterTenvisHandler registers the http handlers for service Tenvis to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterTenvisHandlerClient

func RegisterTenvisHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TenvisClient) error

RegisterTenvisHandlerClient registers the http handlers for service Tenvis to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TenvisClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TenvisClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TenvisClient" to call the correct interceptors.

func RegisterTenvisHandlerFromEndpoint

func RegisterTenvisHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterTenvisHandlerFromEndpoint is same as RegisterTenvisHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterTenvisServer

func RegisterTenvisServer(s *grpc.Server, srv TenvisServer)

Types

type Broadcaster

type Broadcaster struct {
	// contains filtered or unexported fields
}

func NewBroadcaster

func NewBroadcaster(key PrivateKey, storage Storage) *Broadcaster

func (*Broadcaster) GetLedger

func (b *Broadcaster) GetLedger(ctx context.Context, req *GetLedgerRequest) (*LedgerMessage, error)

func (*Broadcaster) StreamSCPMessages

func (b *Broadcaster) StreamSCPMessages(req *empty.Empty, stream Tenvis_StreamSCPMessagesServer) error

type Config

type Config struct {
	Redis       *redis.Client
	Key         PrivateKey
	Peers       map[string]PublicKey
	QuorumSlice *scp.QuorumSlice
}

func (Config) Validate

func (cfg Config) Validate() error

type CreateVotingOperation

type CreateVotingOperation struct {
	Title                string   `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Organizer            string   `protobuf:"bytes,2,opt,name=organizer,proto3" json:"organizer,omitempty"`
	Participants         []string `protobuf:"bytes,3,rep,name=participants,proto3" json:"participants,omitempty"`
	Options              []string `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"`
	Signature            []byte   `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateVotingOperation) Descriptor

func (*CreateVotingOperation) Descriptor() ([]byte, []int)

func (*CreateVotingOperation) GetOptions

func (m *CreateVotingOperation) GetOptions() []string

func (*CreateVotingOperation) GetOrganizer

func (m *CreateVotingOperation) GetOrganizer() string

func (*CreateVotingOperation) GetParticipants

func (m *CreateVotingOperation) GetParticipants() []string

func (*CreateVotingOperation) GetSignature

func (m *CreateVotingOperation) GetSignature() []byte

func (*CreateVotingOperation) GetTitle

func (m *CreateVotingOperation) GetTitle() string

func (*CreateVotingOperation) ProtoMessage

func (*CreateVotingOperation) ProtoMessage()

func (*CreateVotingOperation) Reset

func (m *CreateVotingOperation) Reset()

func (*CreateVotingOperation) String

func (m *CreateVotingOperation) String() string

func (*CreateVotingOperation) XXX_DiscardUnknown

func (m *CreateVotingOperation) XXX_DiscardUnknown()

func (*CreateVotingOperation) XXX_Marshal

func (m *CreateVotingOperation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateVotingOperation) XXX_Merge

func (m *CreateVotingOperation) XXX_Merge(src proto.Message)

func (*CreateVotingOperation) XXX_Size

func (m *CreateVotingOperation) XXX_Size() int

func (*CreateVotingOperation) XXX_Unmarshal

func (m *CreateVotingOperation) XXX_Unmarshal(b []byte) error

type GetLedgerRequest

type GetLedgerRequest struct {
	Index                uint64   `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetLedgerRequest) Descriptor

func (*GetLedgerRequest) Descriptor() ([]byte, []int)

func (*GetLedgerRequest) GetIndex

func (m *GetLedgerRequest) GetIndex() uint64

func (*GetLedgerRequest) ProtoMessage

func (*GetLedgerRequest) ProtoMessage()

func (*GetLedgerRequest) Reset

func (m *GetLedgerRequest) Reset()

func (*GetLedgerRequest) String

func (m *GetLedgerRequest) String() string

func (*GetLedgerRequest) XXX_DiscardUnknown

func (m *GetLedgerRequest) XXX_DiscardUnknown()

func (*GetLedgerRequest) XXX_Marshal

func (m *GetLedgerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetLedgerRequest) XXX_Merge

func (m *GetLedgerRequest) XXX_Merge(src proto.Message)

func (*GetLedgerRequest) XXX_Size

func (m *GetLedgerRequest) XXX_Size() int

func (*GetLedgerRequest) XXX_Unmarshal

func (m *GetLedgerRequest) XXX_Unmarshal(b []byte) error

type GetVotingRequest

type GetVotingRequest struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetVotingRequest) Descriptor

func (*GetVotingRequest) Descriptor() ([]byte, []int)

func (*GetVotingRequest) GetId

func (m *GetVotingRequest) GetId() uint64

func (*GetVotingRequest) ProtoMessage

func (*GetVotingRequest) ProtoMessage()

func (*GetVotingRequest) Reset

func (m *GetVotingRequest) Reset()

func (*GetVotingRequest) String

func (m *GetVotingRequest) String() string

func (*GetVotingRequest) XXX_DiscardUnknown

func (m *GetVotingRequest) XXX_DiscardUnknown()

func (*GetVotingRequest) XXX_Marshal

func (m *GetVotingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetVotingRequest) XXX_Merge

func (m *GetVotingRequest) XXX_Merge(src proto.Message)

func (*GetVotingRequest) XXX_Size

func (m *GetVotingRequest) XXX_Size() int

func (*GetVotingRequest) XXX_Unmarshal

func (m *GetVotingRequest) XXX_Unmarshal(b []byte) error

type Ledger

type Ledger struct {
	Index                uint64   `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Value                []byte   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Ledger) Descriptor

func (*Ledger) Descriptor() ([]byte, []int)

func (*Ledger) GetIndex

func (m *Ledger) GetIndex() uint64

func (*Ledger) GetValue

func (m *Ledger) GetValue() []byte

func (*Ledger) ProtoMessage

func (*Ledger) ProtoMessage()

func (*Ledger) Reset

func (m *Ledger) Reset()

func (*Ledger) String

func (m *Ledger) String() string

func (*Ledger) XXX_DiscardUnknown

func (m *Ledger) XXX_DiscardUnknown()

func (*Ledger) XXX_Marshal

func (m *Ledger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Ledger) XXX_Merge

func (m *Ledger) XXX_Merge(src proto.Message)

func (*Ledger) XXX_Size

func (m *Ledger) XXX_Size() int

func (*Ledger) XXX_Unmarshal

func (m *Ledger) XXX_Unmarshal(b []byte) error

type LedgerMessage

type LedgerMessage struct {
	Ledger               *Ledger  `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"`
	Signature            []byte   `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LedgerMessage) Descriptor

func (*LedgerMessage) Descriptor() ([]byte, []int)

func (*LedgerMessage) GetLedger

func (m *LedgerMessage) GetLedger() *Ledger

func (*LedgerMessage) GetSignature

func (m *LedgerMessage) GetSignature() []byte

func (*LedgerMessage) ProtoMessage

func (*LedgerMessage) ProtoMessage()

func (*LedgerMessage) Reset

func (m *LedgerMessage) Reset()

func (*LedgerMessage) String

func (m *LedgerMessage) String() string

func (*LedgerMessage) XXX_DiscardUnknown

func (m *LedgerMessage) XXX_DiscardUnknown()

func (*LedgerMessage) XXX_Marshal

func (m *LedgerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LedgerMessage) XXX_Merge

func (m *LedgerMessage) XXX_Merge(src proto.Message)

func (*LedgerMessage) XXX_Size

func (m *LedgerMessage) XXX_Size() int

func (*LedgerMessage) XXX_Unmarshal

func (m *LedgerMessage) XXX_Unmarshal(b []byte) error

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

func NewListener

func NewListener(addresses map[string]PublicKey) *Listener

func (*Listener) GetLedger

func (l *Listener) GetLedger(id uint64) (*Ledger, error)

func (*Listener) Stop

func (l *Listener) Stop()

type Node

type Node struct {
	Streaming
	// contains filtered or unexported fields
}

func New

func New(cfg Config) (*Node, error)

func (*Node) CombineValues

func (n *Node) CombineValues(values ...scp.Value) scp.Value

func (*Node) CreateVoting

func (n *Node) CreateVoting(ctx context.Context, op *CreateVotingOperation) (*Voting, error)

func (*Node) GetVoting

func (n *Node) GetVoting(ctx context.Context, req *GetVotingRequest) (*Voting, error)

func (*Node) LoadSlots

func (n *Node) LoadSlots(from uint64, to scp.Slot) (slots []scp.Slot)

func (*Node) PersistSlot

func (n *Node) PersistSlot(s scp.Slot)

func (*Node) Run

func (n *Node) Run()

func (*Node) ValidateValue

func (n *Node) ValidateValue(v scp.Value) bool

func (*Node) Vote

func (n *Node) Vote(ctx context.Context, op *VoteOperation) (*Voting, error)

type PrivateKey

type PrivateKey interface {
	Sign(message []byte) []byte
	String() string
	Public() string
}

type PublicKey

type PublicKey interface {
	Verify(message, sig []byte) bool
	String() string
}

type SCPMessage

type SCPMessage struct {
	Type                 SCPMessage_Type `protobuf:"varint,1,opt,name=type,proto3,enum=tenvis.SCPMessage_Type" json:"type,omitempty"`
	SlotIndex            uint64          `protobuf:"varint,2,opt,name=slot_index,json=slotIndex,proto3" json:"slot_index,omitempty"`
	Counter              uint32          `protobuf:"varint,3,opt,name=counter,proto3" json:"counter,omitempty"`
	Value                []byte          `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*SCPMessage) Descriptor

func (*SCPMessage) Descriptor() ([]byte, []int)

func (*SCPMessage) GetCounter

func (m *SCPMessage) GetCounter() uint32

func (*SCPMessage) GetSlotIndex

func (m *SCPMessage) GetSlotIndex() uint64

func (*SCPMessage) GetType

func (m *SCPMessage) GetType() SCPMessage_Type

func (*SCPMessage) GetValue

func (m *SCPMessage) GetValue() []byte

func (*SCPMessage) ProtoMessage

func (*SCPMessage) ProtoMessage()

func (*SCPMessage) Reset

func (m *SCPMessage) Reset()

func (*SCPMessage) String

func (m *SCPMessage) String() string

func (*SCPMessage) XXX_DiscardUnknown

func (m *SCPMessage) XXX_DiscardUnknown()

func (*SCPMessage) XXX_Marshal

func (m *SCPMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SCPMessage) XXX_Merge

func (m *SCPMessage) XXX_Merge(src proto.Message)

func (*SCPMessage) XXX_Size

func (m *SCPMessage) XXX_Size() int

func (*SCPMessage) XXX_Unmarshal

func (m *SCPMessage) XXX_Unmarshal(b []byte) error

type SCPMessage_Type

type SCPMessage_Type int32
const (
	SCPMessage_UNKNOWN         SCPMessage_Type = 0
	SCPMessage_VOTE_NOMINATE   SCPMessage_Type = 1
	SCPMessage_ACCEPT_NOMINATE SCPMessage_Type = 2
	SCPMessage_VOTE_PREPARE    SCPMessage_Type = 3
	SCPMessage_ACCEPT_PREPARE  SCPMessage_Type = 4
	SCPMessage_VOTE_COMMIT     SCPMessage_Type = 5
	SCPMessage_ACCEPT_COMMIT   SCPMessage_Type = 6
)

func (SCPMessage_Type) EnumDescriptor

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

func (SCPMessage_Type) String

func (x SCPMessage_Type) String() string

type SCPMessages

type SCPMessages struct {
	List                 []*SCPMessage `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
	Signature            []byte        `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*SCPMessages) Descriptor

func (*SCPMessages) Descriptor() ([]byte, []int)

func (*SCPMessages) GetList

func (m *SCPMessages) GetList() []*SCPMessage

func (*SCPMessages) GetSignature

func (m *SCPMessages) GetSignature() []byte

func (*SCPMessages) ProtoMessage

func (*SCPMessages) ProtoMessage()

func (*SCPMessages) Reset

func (m *SCPMessages) Reset()

func (*SCPMessages) String

func (m *SCPMessages) String() string

func (*SCPMessages) XXX_DiscardUnknown

func (m *SCPMessages) XXX_DiscardUnknown()

func (*SCPMessages) XXX_Marshal

func (m *SCPMessages) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SCPMessages) XXX_Merge

func (m *SCPMessages) XXX_Merge(src proto.Message)

func (*SCPMessages) XXX_Size

func (m *SCPMessages) XXX_Size() int

func (*SCPMessages) XXX_Unmarshal

func (m *SCPMessages) XXX_Unmarshal(b []byte) error

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func (*Storage) GetLastLedgerIndex

func (s *Storage) GetLastLedgerIndex() (uint64, error)

func (*Storage) GetLastVotingID

func (s *Storage) GetLastVotingID() (uint64, error)

func (*Storage) GetLedger

func (s *Storage) GetLedger(id uint64) (*Ledger, error)

func (*Storage) GetVoting

func (s *Storage) GetVoting(id uint64) (*Voting, error)

func (*Storage) SetLedger

func (s *Storage) SetLedger(l *Ledger) error

func (*Storage) SetVoting

func (s *Storage) SetVoting(v *Voting) error

func (*Storage) UpdateVoting

func (s *Storage) UpdateVoting(v *Voting) error

type Streaming

type Streaming struct {
	Listener
	Broadcaster
}

func NewStreaming

func NewStreaming(key PrivateKey, addresses map[string]PublicKey, storage Storage) *Streaming

func (*Streaming) GetLedger

func (s *Streaming) GetLedger(ctx context.Context, req *GetLedgerRequest) (*LedgerMessage, error)

func (*Streaming) ID

func (s *Streaming) ID() string

type TenvisClient

type TenvisClient interface {
	StreamSCPMessages(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Tenvis_StreamSCPMessagesClient, error)
	GetLedger(ctx context.Context, in *GetLedgerRequest, opts ...grpc.CallOption) (*LedgerMessage, error)
	GetVoting(ctx context.Context, in *GetVotingRequest, opts ...grpc.CallOption) (*Voting, error)
	CreateVoting(ctx context.Context, in *CreateVotingOperation, opts ...grpc.CallOption) (*Voting, error)
	Vote(ctx context.Context, in *VoteOperation, opts ...grpc.CallOption) (*Voting, error)
}

TenvisClient is the client API for Tenvis service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewTenvisClient

func NewTenvisClient(cc *grpc.ClientConn) TenvisClient

type TenvisOperations

type TenvisOperations struct {
	CreateVoting         []*CreateVotingOperation `protobuf:"bytes,2,rep,name=create_voting,json=createVoting,proto3" json:"create_voting,omitempty"`
	Vote                 []*VoteOperation         `protobuf:"bytes,3,rep,name=vote,proto3" json:"vote,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

func (*TenvisOperations) Descriptor

func (*TenvisOperations) Descriptor() ([]byte, []int)

func (*TenvisOperations) GetCreateVoting

func (m *TenvisOperations) GetCreateVoting() []*CreateVotingOperation

func (*TenvisOperations) GetVote

func (m *TenvisOperations) GetVote() []*VoteOperation

func (*TenvisOperations) ProtoMessage

func (*TenvisOperations) ProtoMessage()

func (*TenvisOperations) Reset

func (m *TenvisOperations) Reset()

func (*TenvisOperations) String

func (m *TenvisOperations) String() string

func (*TenvisOperations) XXX_DiscardUnknown

func (m *TenvisOperations) XXX_DiscardUnknown()

func (*TenvisOperations) XXX_Marshal

func (m *TenvisOperations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TenvisOperations) XXX_Merge

func (m *TenvisOperations) XXX_Merge(src proto.Message)

func (*TenvisOperations) XXX_Size

func (m *TenvisOperations) XXX_Size() int

func (*TenvisOperations) XXX_Unmarshal

func (m *TenvisOperations) XXX_Unmarshal(b []byte) error

type TenvisServer

TenvisServer is the server API for Tenvis service.

type Tenvis_StreamSCPMessagesClient

type Tenvis_StreamSCPMessagesClient interface {
	Recv() (*SCPMessages, error)
	grpc.ClientStream
}

type Tenvis_StreamSCPMessagesServer

type Tenvis_StreamSCPMessagesServer interface {
	Send(*SCPMessages) error
	grpc.ServerStream
}

type UnimplementedTenvisServer

type UnimplementedTenvisServer struct {
}

UnimplementedTenvisServer can be embedded to have forward compatible implementations.

func (*UnimplementedTenvisServer) CreateVoting

func (*UnimplementedTenvisServer) GetLedger

func (*UnimplementedTenvisServer) GetVoting

func (*UnimplementedTenvisServer) StreamSCPMessages

func (*UnimplementedTenvisServer) Vote

type VoteOperation

type VoteOperation struct {
	ParticipantId        string   `protobuf:"bytes,1,opt,name=participant_id,json=participantId,proto3" json:"participant_id,omitempty"`
	VotingId             uint64   `protobuf:"varint,2,opt,name=voting_id,json=votingId,proto3" json:"voting_id,omitempty"`
	Option               string   `protobuf:"bytes,3,opt,name=option,proto3" json:"option,omitempty"`
	Signature            []byte   `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*VoteOperation) Descriptor

func (*VoteOperation) Descriptor() ([]byte, []int)

func (*VoteOperation) GetOption

func (m *VoteOperation) GetOption() string

func (*VoteOperation) GetParticipantId

func (m *VoteOperation) GetParticipantId() string

func (*VoteOperation) GetSignature

func (m *VoteOperation) GetSignature() []byte

func (*VoteOperation) GetVotingId

func (m *VoteOperation) GetVotingId() uint64

func (*VoteOperation) ProtoMessage

func (*VoteOperation) ProtoMessage()

func (*VoteOperation) Reset

func (m *VoteOperation) Reset()

func (*VoteOperation) String

func (m *VoteOperation) String() string

func (*VoteOperation) XXX_DiscardUnknown

func (m *VoteOperation) XXX_DiscardUnknown()

func (*VoteOperation) XXX_Marshal

func (m *VoteOperation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VoteOperation) XXX_Merge

func (m *VoteOperation) XXX_Merge(src proto.Message)

func (*VoteOperation) XXX_Size

func (m *VoteOperation) XXX_Size() int

func (*VoteOperation) XXX_Unmarshal

func (m *VoteOperation) XXX_Unmarshal(b []byte) error

type Voting

type Voting struct {
	Id                   uint64            `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Title                string            `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Organizer            string            `protobuf:"bytes,3,opt,name=organizer,proto3" json:"organizer,omitempty"`
	Participants         []string          `protobuf:"bytes,4,rep,name=participants,proto3" json:"participants,omitempty"`
	Voted                []string          `protobuf:"bytes,5,rep,name=voted,proto3" json:"voted,omitempty"`
	Options              map[string]uint32 `` /* 156-byte string literal not displayed */
	Result               string            `protobuf:"bytes,7,opt,name=result,proto3" json:"result,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Voting) Descriptor

func (*Voting) Descriptor() ([]byte, []int)

func (*Voting) GetId

func (m *Voting) GetId() uint64

func (*Voting) GetOptions

func (m *Voting) GetOptions() map[string]uint32

func (*Voting) GetOrganizer

func (m *Voting) GetOrganizer() string

func (*Voting) GetParticipants

func (m *Voting) GetParticipants() []string

func (*Voting) GetResult

func (m *Voting) GetResult() string

func (*Voting) GetTitle

func (m *Voting) GetTitle() string

func (*Voting) GetVoted

func (m *Voting) GetVoted() []string

func (*Voting) ProtoMessage

func (*Voting) ProtoMessage()

func (*Voting) Reset

func (m *Voting) Reset()

func (*Voting) String

func (m *Voting) String() string

func (*Voting) XXX_DiscardUnknown

func (m *Voting) XXX_DiscardUnknown()

func (*Voting) XXX_Marshal

func (m *Voting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Voting) XXX_Merge

func (m *Voting) XXX_Merge(src proto.Message)

func (*Voting) XXX_Size

func (m *Voting) XXX_Size() int

func (*Voting) XXX_Unmarshal

func (m *Voting) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis
cmd
tenvis command
test-client command

Jump to

Keyboard shortcuts

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