types

package
Version: v1.65.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TyUnknowAction = iota + 100
	TyCreateGroupAction
	TyUpdateGroupAction
	TyCreateVoteAction
	TyCommitVoteAction
	TyCloseVoteAction
	TyUpdateMemberAction

	NameCreateGroupAction  = "CreateGroup"
	NameUpdateGroupAction  = "UpdateGroup"
	NameCreateVoteAction   = "CreateVote"
	NameCommitVoteAction   = "CommitVote"
	NameCloseVoteAction    = "CloseVote"
	NameUpdateMemberAction = "UpdateMember"
)

action类型id和name,这些常量可以自定义修改

View Source
const (
	TyUnknownLog = iota + 100
	TyCreateGroupLog
	TyUpdateGroupLog
	TyCreateVoteLog
	TyCommitVoteLog
	TyCloseVoteLog
	TyUpdateMemberLog

	NameCreateGroupLog  = "CreateGroupLog"
	NameUpdateGroupLog  = "UpdateGroupLog"
	NameCreateVoteLog   = "CreateVoteLog"
	NameCommitVoteLog   = "CommitVoteLog"
	NameCloseVoteLog    = "CloseVoteLog"
	NameUpdateMemberLog = "UpdateMemberLog"
)

log类型id值

Variables

View Source
var (
	//VoteX 执行器名称定义
	VoteX = "vote"
)

Functions

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor defines register executor

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork defines register fork

func NewType

func NewType(cfg *types.Chain33Config) *voteType

Types

type CloseVote

type CloseVote struct {
	VoteID string `protobuf:"bytes,1,opt,name=voteID,proto3" json:"voteID,omitempty"` // 投票ID
	// contains filtered or unexported fields
}

func (*CloseVote) Descriptor deprecated

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

Deprecated: Use CloseVote.ProtoReflect.Descriptor instead.

func (*CloseVote) GetVoteID

func (x *CloseVote) GetVoteID() string

func (*CloseVote) ProtoMessage

func (*CloseVote) ProtoMessage()

func (*CloseVote) ProtoReflect added in v1.65.3

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

func (*CloseVote) Reset

func (x *CloseVote) Reset()

func (*CloseVote) String

func (x *CloseVote) String() string

type CommitInfo

type CommitInfo struct {
	Addr       string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`              //提交地址
	TxHash     string `protobuf:"bytes,2,opt,name=txHash,proto3" json:"txHash,omitempty"`          //提交交易哈希
	VoteWeight uint32 `protobuf:"varint,3,opt,name=voteWeight,proto3" json:"voteWeight,omitempty"` //投票权重
	// contains filtered or unexported fields
}

func (*CommitInfo) Descriptor deprecated

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

Deprecated: Use CommitInfo.ProtoReflect.Descriptor instead.

func (*CommitInfo) GetAddr

func (x *CommitInfo) GetAddr() string

func (*CommitInfo) GetTxHash

func (x *CommitInfo) GetTxHash() string

func (*CommitInfo) GetVoteWeight

func (x *CommitInfo) GetVoteWeight() uint32

func (*CommitInfo) ProtoMessage

func (*CommitInfo) ProtoMessage()

func (*CommitInfo) ProtoReflect added in v1.65.3

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

func (*CommitInfo) Reset

func (x *CommitInfo) Reset()

func (*CommitInfo) String

func (x *CommitInfo) String() string

type CommitVote

type CommitVote struct {
	VoteID      string `protobuf:"bytes,1,opt,name=voteID,proto3" json:"voteID,omitempty"`            //投票ID
	OptionIndex uint32 `protobuf:"varint,2,opt,name=optionIndex,proto3" json:"optionIndex,omitempty"` //投票选项数组下标,下标对应投票内容
	// contains filtered or unexported fields
}

创建提交投票交易,请求结构

func (*CommitVote) Descriptor deprecated

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

Deprecated: Use CommitVote.ProtoReflect.Descriptor instead.

func (*CommitVote) GetOptionIndex

func (x *CommitVote) GetOptionIndex() uint32

func (*CommitVote) GetVoteID

func (x *CommitVote) GetVoteID() string

func (*CommitVote) ProtoMessage

func (*CommitVote) ProtoMessage()

func (*CommitVote) ProtoReflect added in v1.65.3

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

func (*CommitVote) Reset

func (x *CommitVote) Reset()

func (*CommitVote) String

func (x *CommitVote) String() string

type CreateGroup

type CreateGroup struct {
	Name        string         `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`               //投票组名称
	Admins      []string       `protobuf:"bytes,2,rep,name=admins,proto3" json:"admins,omitempty"`           //管理员地址列表,创建者默认为管理员
	Members     []*GroupMember `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"`         //组员
	Description string         `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` //描述
	// contains filtered or unexported fields
}

创建投票组

func (*CreateGroup) Descriptor deprecated

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

Deprecated: Use CreateGroup.ProtoReflect.Descriptor instead.

func (*CreateGroup) GetAdmins

func (x *CreateGroup) GetAdmins() []string

func (*CreateGroup) GetDescription

func (x *CreateGroup) GetDescription() string

func (*CreateGroup) GetMembers

func (x *CreateGroup) GetMembers() []*GroupMember

func (*CreateGroup) GetName

func (x *CreateGroup) GetName() string

func (*CreateGroup) ProtoMessage

func (*CreateGroup) ProtoMessage()

func (*CreateGroup) ProtoReflect added in v1.65.3

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

func (*CreateGroup) Reset

func (x *CreateGroup) Reset()

func (*CreateGroup) String

func (x *CreateGroup) String() string

type CreateVote

type CreateVote struct {
	Name           string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`                      //投票名称
	GroupID        string   `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID,omitempty"`                //投票关联组
	VoteOptions    []string `protobuf:"bytes,3,rep,name=voteOptions,proto3" json:"voteOptions,omitempty"`        //投票选项列表
	BeginTimestamp int64    `protobuf:"varint,4,opt,name=beginTimestamp,proto3" json:"beginTimestamp,omitempty"` //投票开始时间戳
	EndTimestamp   int64    `protobuf:"varint,5,opt,name=endTimestamp,proto3" json:"endTimestamp,omitempty"`     //投票结束时间戳
	Description    string   `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`        //描述信息
	// contains filtered or unexported fields
}

创建投票交易,请求结构

func (*CreateVote) Descriptor deprecated

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

Deprecated: Use CreateVote.ProtoReflect.Descriptor instead.

func (*CreateVote) GetBeginTimestamp

func (x *CreateVote) GetBeginTimestamp() int64

func (*CreateVote) GetDescription

func (x *CreateVote) GetDescription() string

func (*CreateVote) GetEndTimestamp

func (x *CreateVote) GetEndTimestamp() int64

func (*CreateVote) GetGroupID

func (x *CreateVote) GetGroupID() string

func (*CreateVote) GetName

func (x *CreateVote) GetName() string

func (*CreateVote) GetVoteOptions

func (x *CreateVote) GetVoteOptions() []string

func (*CreateVote) ProtoMessage

func (*CreateVote) ProtoMessage()

func (*CreateVote) ProtoReflect added in v1.65.3

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

func (*CreateVote) Reset

func (x *CreateVote) Reset()

func (*CreateVote) String

func (x *CreateVote) String() string

type GroupInfo

type GroupInfo struct {
	ID          string         `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`                   //投票组ID
	Name        string         `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`               //投票组名称
	MemberNum   uint32         `protobuf:"varint,3,opt,name=memberNum,proto3" json:"memberNum,omitempty"`    //组员数量
	Creator     string         `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"`         //创建者
	Admins      []string       `protobuf:"bytes,5,rep,name=admins,proto3" json:"admins,omitempty"`           //管理员列表
	Members     []*GroupMember `protobuf:"bytes,6,rep,name=members,proto3" json:"members,omitempty"`         //成员列表
	Description string         `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` //描述信息
	VoteNum     uint32         `protobuf:"varint,8,opt,name=voteNum,proto3" json:"voteNum,omitempty"`        //投票数量
	// contains filtered or unexported fields
}

投票组信息

func (*GroupInfo) Descriptor deprecated

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

Deprecated: Use GroupInfo.ProtoReflect.Descriptor instead.

func (*GroupInfo) GetAdmins

func (x *GroupInfo) GetAdmins() []string

func (*GroupInfo) GetCreator

func (x *GroupInfo) GetCreator() string

func (*GroupInfo) GetDescription

func (x *GroupInfo) GetDescription() string

func (*GroupInfo) GetID

func (x *GroupInfo) GetID() string

func (*GroupInfo) GetMemberNum

func (x *GroupInfo) GetMemberNum() uint32

func (*GroupInfo) GetMembers

func (x *GroupInfo) GetMembers() []*GroupMember

func (*GroupInfo) GetName

func (x *GroupInfo) GetName() string

func (*GroupInfo) GetVoteNum

func (x *GroupInfo) GetVoteNum() uint32

func (*GroupInfo) ProtoMessage

func (*GroupInfo) ProtoMessage()

func (*GroupInfo) ProtoReflect added in v1.65.3

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

func (*GroupInfo) Reset

func (x *GroupInfo) Reset()

func (*GroupInfo) String

func (x *GroupInfo) String() string

type GroupInfos

type GroupInfos struct {
	GroupList []*GroupInfo `protobuf:"bytes,1,rep,name=groupList,proto3" json:"groupList,omitempty"` //投票组信息列表
	// contains filtered or unexported fields
}

func (*GroupInfos) Descriptor deprecated

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

Deprecated: Use GroupInfos.ProtoReflect.Descriptor instead.

func (*GroupInfos) GetGroupList

func (x *GroupInfos) GetGroupList() []*GroupInfo

func (*GroupInfos) ProtoMessage

func (*GroupInfos) ProtoMessage()

func (*GroupInfos) ProtoReflect added in v1.65.3

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

func (*GroupInfos) Reset

func (x *GroupInfos) Reset()

func (*GroupInfos) String

func (x *GroupInfos) String() string

type GroupMember

type GroupMember struct {
	Addr       string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`              //用户地址
	VoteWeight uint32 `protobuf:"varint,2,opt,name=voteWeight,proto3" json:"voteWeight,omitempty"` //投票权重, 不填时默认为1
	NickName   string `protobuf:"bytes,3,opt,name=nickName,proto3" json:"nickName,omitempty"`      //群昵称
	// contains filtered or unexported fields
}

func (*GroupMember) Descriptor deprecated

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

Deprecated: Use GroupMember.ProtoReflect.Descriptor instead.

func (*GroupMember) GetAddr

func (x *GroupMember) GetAddr() string

func (*GroupMember) GetNickName

func (x *GroupMember) GetNickName() string

func (*GroupMember) GetVoteWeight

func (x *GroupMember) GetVoteWeight() uint32

func (*GroupMember) ProtoMessage

func (*GroupMember) ProtoMessage()

func (*GroupMember) ProtoReflect added in v1.65.3

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

func (*GroupMember) Reset

func (x *GroupMember) Reset()

func (*GroupMember) String

func (x *GroupMember) String() string

type MemberInfo

type MemberInfo struct {
	Addr     string   `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`         //地址
	Name     string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`         //用户名称
	GroupIDs []string `protobuf:"bytes,3,rep,name=groupIDs,proto3" json:"groupIDs,omitempty"` //所属投票组的ID列表
	// contains filtered or unexported fields
}

func (*MemberInfo) Descriptor deprecated

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

Deprecated: Use MemberInfo.ProtoReflect.Descriptor instead.

func (*MemberInfo) GetAddr

func (x *MemberInfo) GetAddr() string

func (*MemberInfo) GetGroupIDs

func (x *MemberInfo) GetGroupIDs() []string

func (*MemberInfo) GetName

func (x *MemberInfo) GetName() string

func (*MemberInfo) ProtoMessage

func (*MemberInfo) ProtoMessage()

func (*MemberInfo) ProtoReflect added in v1.65.3

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

func (*MemberInfo) Reset

func (x *MemberInfo) Reset()

func (*MemberInfo) String

func (x *MemberInfo) String() string

type MemberInfos

type MemberInfos struct {
	MemberList []*MemberInfo `protobuf:"bytes,1,rep,name=memberList,proto3" json:"memberList,omitempty"` //投票组成员信息列表
	// contains filtered or unexported fields
}

func (*MemberInfos) Descriptor deprecated

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

Deprecated: Use MemberInfos.ProtoReflect.Descriptor instead.

func (*MemberInfos) GetMemberList

func (x *MemberInfos) GetMemberList() []*MemberInfo

func (*MemberInfos) ProtoMessage

func (*MemberInfos) ProtoMessage()

func (*MemberInfos) ProtoReflect added in v1.65.3

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

func (*MemberInfos) Reset

func (x *MemberInfos) Reset()

func (*MemberInfos) String

func (x *MemberInfos) String() string

type ReplyVoteList

type ReplyVoteList struct {
	VoteList         []*VoteInfo `protobuf:"bytes,1,rep,name=voteList,proto3" json:"voteList,omitempty"`                  //投票列表
	CurrentTimestamp int64       `protobuf:"varint,2,opt,name=currentTimestamp,proto3" json:"currentTimestamp,omitempty"` //当前系统时间
	// contains filtered or unexported fields
}

func (*ReplyVoteList) Descriptor deprecated

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

Deprecated: Use ReplyVoteList.ProtoReflect.Descriptor instead.

func (*ReplyVoteList) GetCurrentTimestamp

func (x *ReplyVoteList) GetCurrentTimestamp() int64

func (*ReplyVoteList) GetVoteList

func (x *ReplyVoteList) GetVoteList() []*VoteInfo

func (*ReplyVoteList) ProtoMessage

func (*ReplyVoteList) ProtoMessage()

func (*ReplyVoteList) ProtoReflect added in v1.65.3

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

func (*ReplyVoteList) Reset

func (x *ReplyVoteList) Reset()

func (*ReplyVoteList) String

func (x *ReplyVoteList) String() string

type ReqListItem

type ReqListItem struct {
	StartItemID string `protobuf:"bytes,1,opt,name=startItemID,proto3" json:"startItemID,omitempty"` //列表开始的ID,如请求组列表即groupID,不包含在结果中
	Count       int32  `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`            //请求列表项数量, 0表示请求所有
	Direction   int32  `protobuf:"varint,3,opt,name=direction,proto3" json:"direction,omitempty"`    // 0表示根据ID降序,1表示升序,目前ID和区块高度正相关
	// contains filtered or unexported fields
}

列表请求结构

func (*ReqListItem) Descriptor deprecated

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

Deprecated: Use ReqListItem.ProtoReflect.Descriptor instead.

func (*ReqListItem) GetCount

func (x *ReqListItem) GetCount() int32

func (*ReqListItem) GetDirection

func (x *ReqListItem) GetDirection() int32

func (*ReqListItem) GetStartItemID

func (x *ReqListItem) GetStartItemID() string

func (*ReqListItem) ProtoMessage

func (*ReqListItem) ProtoMessage()

func (*ReqListItem) ProtoReflect added in v1.65.3

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

func (*ReqListItem) Reset

func (x *ReqListItem) Reset()

func (*ReqListItem) String

func (x *ReqListItem) String() string

type ReqListVote

type ReqListVote struct {
	GroupID string       `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID,omitempty"` //指定所属组ID
	ListReq *ReqListItem `protobuf:"bytes,2,opt,name=listReq,proto3" json:"listReq,omitempty"` //列表请求
	Status  uint32       `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`  //指定投票状态
	// contains filtered or unexported fields
}

func (*ReqListVote) Descriptor deprecated

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

Deprecated: Use ReqListVote.ProtoReflect.Descriptor instead.

func (*ReqListVote) GetGroupID

func (x *ReqListVote) GetGroupID() string

func (*ReqListVote) GetListReq

func (x *ReqListVote) GetListReq() *ReqListItem

func (*ReqListVote) GetStatus

func (x *ReqListVote) GetStatus() uint32

func (*ReqListVote) ProtoMessage

func (*ReqListVote) ProtoMessage()

func (*ReqListVote) ProtoReflect added in v1.65.3

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

func (*ReqListVote) Reset

func (x *ReqListVote) Reset()

func (*ReqListVote) String

func (x *ReqListVote) String() string

type ReqStrings

type ReqStrings struct {
	Items []string `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` //请求项数组
	// contains filtered or unexported fields
}

func (*ReqStrings) Descriptor deprecated

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

Deprecated: Use ReqStrings.ProtoReflect.Descriptor instead.

func (*ReqStrings) GetItems

func (x *ReqStrings) GetItems() []string

func (*ReqStrings) ProtoMessage

func (*ReqStrings) ProtoMessage()

func (*ReqStrings) ProtoReflect added in v1.65.3

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

func (*ReqStrings) Reset

func (x *ReqStrings) Reset()

func (*ReqStrings) String

func (x *ReqStrings) String() string

type UpdateGroup

type UpdateGroup struct {
	GroupID       string         `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID,omitempty"`             //投票组ID
	AddMembers    []*GroupMember `protobuf:"bytes,2,rep,name=addMembers,proto3" json:"addMembers,omitempty"`       //需要增加的组成员
	RemoveMembers []string       `protobuf:"bytes,3,rep,name=removeMembers,proto3" json:"removeMembers,omitempty"` //删除组成员的地址列表
	AddAdmins     []string       `protobuf:"bytes,4,rep,name=addAdmins,proto3" json:"addAdmins,omitempty"`         //增加管理员
	RemoveAdmins  []string       `protobuf:"bytes,5,rep,name=removeAdmins,proto3" json:"removeAdmins,omitempty"`   //删除管理员
	// contains filtered or unexported fields
}

更新投票组

func (*UpdateGroup) Descriptor deprecated

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

Deprecated: Use UpdateGroup.ProtoReflect.Descriptor instead.

func (*UpdateGroup) GetAddAdmins

func (x *UpdateGroup) GetAddAdmins() []string

func (*UpdateGroup) GetAddMembers

func (x *UpdateGroup) GetAddMembers() []*GroupMember

func (*UpdateGroup) GetGroupID

func (x *UpdateGroup) GetGroupID() string

func (*UpdateGroup) GetRemoveAdmins

func (x *UpdateGroup) GetRemoveAdmins() []string

func (*UpdateGroup) GetRemoveMembers

func (x *UpdateGroup) GetRemoveMembers() []string

func (*UpdateGroup) ProtoMessage

func (*UpdateGroup) ProtoMessage()

func (*UpdateGroup) ProtoReflect added in v1.65.3

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

func (*UpdateGroup) Reset

func (x *UpdateGroup) Reset()

func (*UpdateGroup) String

func (x *UpdateGroup) String() string

type UpdateMember

type UpdateMember struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` //用户名称
	// contains filtered or unexported fields
}

func (*UpdateMember) Descriptor deprecated

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

Deprecated: Use UpdateMember.ProtoReflect.Descriptor instead.

func (*UpdateMember) GetName

func (x *UpdateMember) GetName() string

func (*UpdateMember) ProtoMessage

func (*UpdateMember) ProtoMessage()

func (*UpdateMember) ProtoReflect added in v1.65.3

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

func (*UpdateMember) Reset

func (x *UpdateMember) Reset()

func (*UpdateMember) String

func (x *UpdateMember) String() string

type VoteAction

type VoteAction struct {
	Ty int32 `protobuf:"varint,1,opt,name=ty,proto3" json:"ty,omitempty"`
	// Types that are assignable to Value:
	//	*VoteAction_CreateGroup
	//	*VoteAction_UpdateGroup
	//	*VoteAction_CreateVote
	//	*VoteAction_CommitVote
	//	*VoteAction_CloseVote
	//	*VoteAction_UpdateMember
	Value isVoteAction_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

vote 合约交易行为总类型

func (*VoteAction) Descriptor deprecated

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

Deprecated: Use VoteAction.ProtoReflect.Descriptor instead.

func (*VoteAction) GetCloseVote

func (x *VoteAction) GetCloseVote() *CloseVote

func (*VoteAction) GetCommitVote

func (x *VoteAction) GetCommitVote() *CommitVote

func (*VoteAction) GetCreateGroup

func (x *VoteAction) GetCreateGroup() *CreateGroup

func (*VoteAction) GetCreateVote

func (x *VoteAction) GetCreateVote() *CreateVote

func (*VoteAction) GetTy

func (x *VoteAction) GetTy() int32

func (*VoteAction) GetUpdateGroup

func (x *VoteAction) GetUpdateGroup() *UpdateGroup

func (*VoteAction) GetUpdateMember

func (x *VoteAction) GetUpdateMember() *UpdateMember

func (*VoteAction) GetValue

func (m *VoteAction) GetValue() isVoteAction_Value

func (*VoteAction) ProtoMessage

func (*VoteAction) ProtoMessage()

func (*VoteAction) ProtoReflect added in v1.65.3

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

func (*VoteAction) Reset

func (x *VoteAction) Reset()

func (*VoteAction) String

func (x *VoteAction) String() string

type VoteAction_CloseVote

type VoteAction_CloseVote struct {
	CloseVote *CloseVote `protobuf:"bytes,6,opt,name=closeVote,proto3,oneof"` //关闭投票
}

type VoteAction_CommitVote

type VoteAction_CommitVote struct {
	CommitVote *CommitVote `protobuf:"bytes,5,opt,name=commitVote,proto3,oneof"` //组员提交投票
}

type VoteAction_CreateGroup

type VoteAction_CreateGroup struct {
	CreateGroup *CreateGroup `protobuf:"bytes,2,opt,name=createGroup,proto3,oneof"` //创建投票组
}

type VoteAction_CreateVote

type VoteAction_CreateVote struct {
	CreateVote *CreateVote `protobuf:"bytes,4,opt,name=createVote,proto3,oneof"` //创建一个投票
}

type VoteAction_UpdateGroup

type VoteAction_UpdateGroup struct {
	UpdateGroup *UpdateGroup `protobuf:"bytes,3,opt,name=updateGroup,proto3,oneof"` //更新组成员
}

type VoteAction_UpdateMember

type VoteAction_UpdateMember struct {
	UpdateMember *UpdateMember `protobuf:"bytes,7,opt,name=updateMember,proto3,oneof"` //更新用户信息
}

type VoteInfo

type VoteInfo struct {
	ID             string        `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`                          //投票ID
	Name           string        `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`                      //投票名称
	Creator        string        `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"`                //创建者
	GroupID        string        `protobuf:"bytes,4,opt,name=groupID,proto3" json:"groupID,omitempty"`                //投票关联的投票组
	VoteOptions    []*VoteOption `protobuf:"bytes,5,rep,name=voteOptions,proto3" json:"voteOptions,omitempty"`        //投票的选项
	BeginTimestamp int64         `protobuf:"varint,6,opt,name=beginTimestamp,proto3" json:"beginTimestamp,omitempty"` //投票开始时间戳
	EndTimestamp   int64         `protobuf:"varint,7,opt,name=endTimestamp,proto3" json:"endTimestamp,omitempty"`     //投票结束时间戳
	CommitInfos    []*CommitInfo `protobuf:"bytes,8,rep,name=commitInfos,proto3" json:"commitInfos,omitempty"`        //已投票的提交信息
	Description    string        `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"`        //描述信息
	Status         uint32        `protobuf:"varint,10,opt,name=status,proto3" json:"status,omitempty"`                //状态,1即将开始,2正在进行,3已经结束,4已关闭
	GroupName      string        `protobuf:"bytes,11,opt,name=groupName,proto3" json:"groupName,omitempty"`           //所属投票组名称
	// contains filtered or unexported fields
}

投票信息

func (*VoteInfo) Descriptor deprecated

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

Deprecated: Use VoteInfo.ProtoReflect.Descriptor instead.

func (*VoteInfo) GetBeginTimestamp

func (x *VoteInfo) GetBeginTimestamp() int64

func (*VoteInfo) GetCommitInfos

func (x *VoteInfo) GetCommitInfos() []*CommitInfo

func (*VoteInfo) GetCreator

func (x *VoteInfo) GetCreator() string

func (*VoteInfo) GetDescription

func (x *VoteInfo) GetDescription() string

func (*VoteInfo) GetEndTimestamp

func (x *VoteInfo) GetEndTimestamp() int64

func (*VoteInfo) GetGroupID

func (x *VoteInfo) GetGroupID() string

func (*VoteInfo) GetGroupName added in v1.65.3

func (x *VoteInfo) GetGroupName() string

func (*VoteInfo) GetID

func (x *VoteInfo) GetID() string

func (*VoteInfo) GetName

func (x *VoteInfo) GetName() string

func (*VoteInfo) GetStatus

func (x *VoteInfo) GetStatus() uint32

func (*VoteInfo) GetVoteOptions

func (x *VoteInfo) GetVoteOptions() []*VoteOption

func (*VoteInfo) ProtoMessage

func (*VoteInfo) ProtoMessage()

func (*VoteInfo) ProtoReflect added in v1.65.3

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

func (*VoteInfo) Reset

func (x *VoteInfo) Reset()

func (*VoteInfo) String

func (x *VoteInfo) String() string

type VoteInfos

type VoteInfos struct {
	VoteList []*VoteInfo `protobuf:"bytes,1,rep,name=voteList,proto3" json:"voteList,omitempty"` //投票信息列表
	// contains filtered or unexported fields
}

func (*VoteInfos) Descriptor deprecated

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

Deprecated: Use VoteInfos.ProtoReflect.Descriptor instead.

func (*VoteInfos) GetVoteList

func (x *VoteInfos) GetVoteList() []*VoteInfo

func (*VoteInfos) ProtoMessage

func (*VoteInfos) ProtoMessage()

func (*VoteInfos) ProtoReflect added in v1.65.3

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

func (*VoteInfos) Reset

func (x *VoteInfos) Reset()

func (*VoteInfos) String

func (x *VoteInfos) String() string

type VoteOption

type VoteOption struct {
	Option string `protobuf:"bytes,1,opt,name=option,proto3" json:"option,omitempty"` //投票选项
	Score  uint32 `protobuf:"varint,2,opt,name=score,proto3" json:"score,omitempty"`  //投票得分
	// contains filtered or unexported fields
}

投票选项

func (*VoteOption) Descriptor deprecated

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

Deprecated: Use VoteOption.ProtoReflect.Descriptor instead.

func (*VoteOption) GetOption

func (x *VoteOption) GetOption() string

func (*VoteOption) GetScore

func (x *VoteOption) GetScore() uint32

func (*VoteOption) ProtoMessage

func (*VoteOption) ProtoMessage()

func (*VoteOption) ProtoReflect added in v1.65.3

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

func (*VoteOption) Reset

func (x *VoteOption) Reset()

func (*VoteOption) String

func (x *VoteOption) String() string

Source Files

Jump to

Keyboard shortcuts

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