You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2813 lines
70 KiB
2813 lines
70 KiB
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: api/v1/group.proto
|
|
|
|
package v1
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
_ "google.golang.org/protobuf/types/known/timestamppb"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
time "time"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
var _ = time.Kitchen
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
// 用户组,角色
|
|
type Group struct {
|
|
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
|
|
Color string `protobuf:"bytes,3,opt,name=color,proto3" json:"color,omitempty"`
|
|
IsDefault bool `protobuf:"varint,4,opt,name=is_default,json=isDefault,proto3" json:"is_default,omitempty"`
|
|
IsDisplay bool `protobuf:"varint,5,opt,name=is_display,json=isDisplay,proto3" json:"is_display,omitempty"`
|
|
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
|
|
UserCount int32 `protobuf:"varint,7,opt,name=user_count,json=userCount,proto3" json:"user_count,omitempty"`
|
|
Sort int32 `protobuf:"varint,8,opt,name=sort,proto3" json:"sort,omitempty"`
|
|
EnableUpload bool `protobuf:"varint,11,opt,name=enable_upload,json=enableUpload,proto3" json:"enable_upload,omitempty"`
|
|
EnableCommentApproval bool `protobuf:"varint,12,opt,name=enable_comment_approval,json=enableCommentApproval,proto3" json:"enable_comment_approval,omitempty"`
|
|
CreatedAt *time.Time `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"`
|
|
UpdatedAt *time.Time `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at,omitempty"`
|
|
}
|
|
|
|
func (m *Group) Reset() { *m = Group{} }
|
|
func (m *Group) String() string { return proto.CompactTextString(m) }
|
|
func (*Group) ProtoMessage() {}
|
|
func (*Group) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e95c92b0421dbd41, []int{0}
|
|
}
|
|
func (m *Group) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Group.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Group) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Group.Merge(m, src)
|
|
}
|
|
func (m *Group) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Group) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Group.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Group proto.InternalMessageInfo
|
|
|
|
func (m *Group) GetId() int64 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Group) GetTitle() string {
|
|
if m != nil {
|
|
return m.Title
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Group) GetColor() string {
|
|
if m != nil {
|
|
return m.Color
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Group) GetIsDefault() bool {
|
|
if m != nil {
|
|
return m.IsDefault
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *Group) GetIsDisplay() bool {
|
|
if m != nil {
|
|
return m.IsDisplay
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *Group) GetDescription() string {
|
|
if m != nil {
|
|
return m.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Group) GetUserCount() int32 {
|
|
if m != nil {
|
|
return m.UserCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Group) GetSort() int32 {
|
|
if m != nil {
|
|
return m.Sort
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Group) GetEnableUpload() bool {
|
|
if m != nil {
|
|
return m.EnableUpload
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *Group) GetEnableCommentApproval() bool {
|
|
if m != nil {
|
|
return m.EnableCommentApproval
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *Group) GetCreatedAt() *time.Time {
|
|
if m != nil {
|
|
return m.CreatedAt
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Group) GetUpdatedAt() *time.Time {
|
|
if m != nil {
|
|
return m.UpdatedAt
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// 删除用户组,可以批量删除
|
|
type DeleteGroupRequest struct {
|
|
Id []int64 `protobuf:"varint,1,rep,packed,name=id,proto3" json:"id,omitempty"`
|
|
}
|
|
|
|
func (m *DeleteGroupRequest) Reset() { *m = DeleteGroupRequest{} }
|
|
func (m *DeleteGroupRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*DeleteGroupRequest) ProtoMessage() {}
|
|
func (*DeleteGroupRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e95c92b0421dbd41, []int{1}
|
|
}
|
|
func (m *DeleteGroupRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *DeleteGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_DeleteGroupRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *DeleteGroupRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DeleteGroupRequest.Merge(m, src)
|
|
}
|
|
func (m *DeleteGroupRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *DeleteGroupRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DeleteGroupRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DeleteGroupRequest proto.InternalMessageInfo
|
|
|
|
func (m *DeleteGroupRequest) GetId() []int64 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// 根据组名或者ID获取用户组
|
|
type GetGroupRequest struct {
|
|
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
|
|
}
|
|
|
|
func (m *GetGroupRequest) Reset() { *m = GetGroupRequest{} }
|
|
func (m *GetGroupRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*GetGroupRequest) ProtoMessage() {}
|
|
func (*GetGroupRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e95c92b0421dbd41, []int{2}
|
|
}
|
|
func (m *GetGroupRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *GetGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_GetGroupRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *GetGroupRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GetGroupRequest.Merge(m, src)
|
|
}
|
|
func (m *GetGroupRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *GetGroupRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GetGroupRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GetGroupRequest proto.InternalMessageInfo
|
|
|
|
func (m *GetGroupRequest) GetId() int64 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *GetGroupRequest) GetTitle() string {
|
|
if m != nil {
|
|
return m.Title
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// 查询用户组列表。不需要分页,直接返回全部用户组,只是可以指定查询哪些字段
|
|
type ListGroupRequest struct {
|
|
Wd string `protobuf:"bytes,1,opt,name=wd,proto3" json:"wd,omitempty"`
|
|
Page int64 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
|
|
Size_ int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
|
|
Sort string `protobuf:"bytes,4,opt,name=sort,proto3" json:"sort,omitempty"`
|
|
Field []string `protobuf:"bytes,5,rep,name=field,proto3" json:"field,omitempty"`
|
|
}
|
|
|
|
func (m *ListGroupRequest) Reset() { *m = ListGroupRequest{} }
|
|
func (m *ListGroupRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ListGroupRequest) ProtoMessage() {}
|
|
func (*ListGroupRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e95c92b0421dbd41, []int{3}
|
|
}
|
|
func (m *ListGroupRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ListGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ListGroupRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ListGroupRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ListGroupRequest.Merge(m, src)
|
|
}
|
|
func (m *ListGroupRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ListGroupRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ListGroupRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ListGroupRequest proto.InternalMessageInfo
|
|
|
|
func (m *ListGroupRequest) GetWd() string {
|
|
if m != nil {
|
|
return m.Wd
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ListGroupRequest) GetPage() int64 {
|
|
if m != nil {
|
|
return m.Page
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ListGroupRequest) GetSize_() int64 {
|
|
if m != nil {
|
|
return m.Size_
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ListGroupRequest) GetSort() string {
|
|
if m != nil {
|
|
return m.Sort
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ListGroupRequest) GetField() []string {
|
|
if m != nil {
|
|
return m.Field
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// 用户组列表
|
|
type ListGroupReply struct {
|
|
Group []*Group `protobuf:"bytes,1,rep,name=group,proto3" json:"group,omitempty"`
|
|
Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
|
|
}
|
|
|
|
func (m *ListGroupReply) Reset() { *m = ListGroupReply{} }
|
|
func (m *ListGroupReply) String() string { return proto.CompactTextString(m) }
|
|
func (*ListGroupReply) ProtoMessage() {}
|
|
func (*ListGroupReply) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e95c92b0421dbd41, []int{4}
|
|
}
|
|
func (m *ListGroupReply) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ListGroupReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ListGroupReply.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ListGroupReply) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ListGroupReply.Merge(m, src)
|
|
}
|
|
func (m *ListGroupReply) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ListGroupReply) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ListGroupReply.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ListGroupReply proto.InternalMessageInfo
|
|
|
|
func (m *ListGroupReply) GetGroup() []*Group {
|
|
if m != nil {
|
|
return m.Group
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ListGroupReply) GetTotal() int64 {
|
|
if m != nil {
|
|
return m.Total
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// 获取用户组权限
|
|
type GetGroupPermissionRequest struct {
|
|
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
}
|
|
|
|
func (m *GetGroupPermissionRequest) Reset() { *m = GetGroupPermissionRequest{} }
|
|
func (m *GetGroupPermissionRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*GetGroupPermissionRequest) ProtoMessage() {}
|
|
func (*GetGroupPermissionRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e95c92b0421dbd41, []int{5}
|
|
}
|
|
func (m *GetGroupPermissionRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *GetGroupPermissionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_GetGroupPermissionRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *GetGroupPermissionRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GetGroupPermissionRequest.Merge(m, src)
|
|
}
|
|
func (m *GetGroupPermissionRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *GetGroupPermissionRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GetGroupPermissionRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GetGroupPermissionRequest proto.InternalMessageInfo
|
|
|
|
func (m *GetGroupPermissionRequest) GetId() int64 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// 更新用户组权限
|
|
type UpdateGroupPermissionRequest struct {
|
|
GroupId int64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
|
|
PermissionId []int64 `protobuf:"varint,2,rep,packed,name=permission_id,json=permissionId,proto3" json:"permission_id,omitempty"`
|
|
}
|
|
|
|
func (m *UpdateGroupPermissionRequest) Reset() { *m = UpdateGroupPermissionRequest{} }
|
|
func (m *UpdateGroupPermissionRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*UpdateGroupPermissionRequest) ProtoMessage() {}
|
|
func (*UpdateGroupPermissionRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e95c92b0421dbd41, []int{6}
|
|
}
|
|
func (m *UpdateGroupPermissionRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *UpdateGroupPermissionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_UpdateGroupPermissionRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *UpdateGroupPermissionRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_UpdateGroupPermissionRequest.Merge(m, src)
|
|
}
|
|
func (m *UpdateGroupPermissionRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *UpdateGroupPermissionRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_UpdateGroupPermissionRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_UpdateGroupPermissionRequest proto.InternalMessageInfo
|
|
|
|
func (m *UpdateGroupPermissionRequest) GetGroupId() int64 {
|
|
if m != nil {
|
|
return m.GroupId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *UpdateGroupPermissionRequest) GetPermissionId() []int64 {
|
|
if m != nil {
|
|
return m.PermissionId
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// 用户组权限
|
|
type GroupPermissions struct {
|
|
PermissionId []int64 `protobuf:"varint,1,rep,packed,name=permission_id,json=permissionId,proto3" json:"permission_id,omitempty"`
|
|
}
|
|
|
|
func (m *GroupPermissions) Reset() { *m = GroupPermissions{} }
|
|
func (m *GroupPermissions) String() string { return proto.CompactTextString(m) }
|
|
func (*GroupPermissions) ProtoMessage() {}
|
|
func (*GroupPermissions) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e95c92b0421dbd41, []int{7}
|
|
}
|
|
func (m *GroupPermissions) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *GroupPermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_GroupPermissions.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *GroupPermissions) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GroupPermissions.Merge(m, src)
|
|
}
|
|
func (m *GroupPermissions) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *GroupPermissions) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GroupPermissions.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GroupPermissions proto.InternalMessageInfo
|
|
|
|
func (m *GroupPermissions) GetPermissionId() []int64 {
|
|
if m != nil {
|
|
return m.PermissionId
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*Group)(nil), "api.v1.Group")
|
|
proto.RegisterType((*DeleteGroupRequest)(nil), "api.v1.DeleteGroupRequest")
|
|
proto.RegisterType((*GetGroupRequest)(nil), "api.v1.GetGroupRequest")
|
|
proto.RegisterType((*ListGroupRequest)(nil), "api.v1.ListGroupRequest")
|
|
proto.RegisterType((*ListGroupReply)(nil), "api.v1.ListGroupReply")
|
|
proto.RegisterType((*GetGroupPermissionRequest)(nil), "api.v1.GetGroupPermissionRequest")
|
|
proto.RegisterType((*UpdateGroupPermissionRequest)(nil), "api.v1.UpdateGroupPermissionRequest")
|
|
proto.RegisterType((*GroupPermissions)(nil), "api.v1.GroupPermissions")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("api/v1/group.proto", fileDescriptor_e95c92b0421dbd41) }
|
|
|
|
var fileDescriptor_e95c92b0421dbd41 = []byte{
|
|
// 784 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xcd, 0x4e, 0xdb, 0x4c,
|
|
0x14, 0xc5, 0x49, 0x0c, 0xc9, 0x0d, 0x7f, 0xdf, 0x28, 0xc0, 0xe0, 0x0f, 0x82, 0x6b, 0x58, 0x44,
|
|
0x54, 0x4a, 0x04, 0x55, 0x5b, 0x89, 0x2e, 0xaa, 0xf0, 0x23, 0x14, 0xb5, 0xaa, 0x90, 0x55, 0xa4,
|
|
0xb6, 0x8b, 0x46, 0x26, 0x1e, 0xa2, 0x91, 0x9c, 0x8c, 0x6b, 0x8f, 0x83, 0xc2, 0xb2, 0x4f, 0x80,
|
|
0xda, 0x67, 0xe9, 0x3b, 0x74, 0x89, 0xd4, 0x4d, 0x77, 0xad, 0xa0, 0x0f, 0x52, 0xcd, 0x8c, 0x1d,
|
|
0x92, 0x98, 0xa0, 0xee, 0x66, 0xce, 0xbd, 0xe7, 0xdc, 0x3b, 0xf7, 0x1e, 0x27, 0x80, 0x1c, 0x9f,
|
|
0xd6, 0x7a, 0x3b, 0xb5, 0x76, 0xc0, 0x22, 0xbf, 0xea, 0x07, 0x8c, 0x33, 0x34, 0xed, 0xf8, 0xb4,
|
|
0xda, 0xdb, 0x31, 0x36, 0xda, 0x8c, 0xb5, 0x3d, 0x52, 0x93, 0xe8, 0x59, 0x74, 0x5e, 0xe3, 0xb4,
|
|
0x43, 0x42, 0xee, 0x74, 0xe2, 0x44, 0xa3, 0xd4, 0x66, 0x6d, 0x26, 0x8f, 0x35, 0x71, 0x8a, 0xd1,
|
|
0xb5, 0x98, 0x26, 0x94, 0x9d, 0x6e, 0x97, 0x71, 0x87, 0x53, 0xd6, 0x0d, 0xe3, 0xe8, 0xff, 0xe3,
|
|
0xa2, 0xa4, 0xe3, 0xf3, 0xbe, 0x0a, 0x5a, 0xdf, 0xb2, 0xa0, 0x1f, 0x8b, 0x4e, 0xd0, 0x3c, 0x64,
|
|
0xa8, 0x8b, 0x35, 0x53, 0xab, 0x64, 0xed, 0x0c, 0x75, 0x51, 0x09, 0x74, 0x4e, 0xb9, 0x47, 0x70,
|
|
0xc6, 0xd4, 0x2a, 0x05, 0x5b, 0x5d, 0x04, 0xda, 0x62, 0x1e, 0x0b, 0x70, 0x56, 0xa1, 0xf2, 0x82,
|
|
0xd6, 0x01, 0x68, 0xd8, 0x74, 0xc9, 0xb9, 0x13, 0x79, 0x1c, 0xe7, 0x4c, 0xad, 0x92, 0xb7, 0x0b,
|
|
0x34, 0x3c, 0x54, 0x40, 0x12, 0xa6, 0xa1, 0xef, 0x39, 0x7d, 0xac, 0x0f, 0xc2, 0x0a, 0x40, 0x26,
|
|
0x14, 0x5d, 0x12, 0xb6, 0x02, 0xea, 0x8b, 0xb6, 0xf1, 0xb4, 0x54, 0x1e, 0x86, 0x84, 0x40, 0x14,
|
|
0x92, 0xa0, 0xd9, 0x62, 0x51, 0x97, 0xe3, 0x19, 0x53, 0xab, 0xe8, 0x76, 0x41, 0x20, 0x07, 0x02,
|
|
0x40, 0x08, 0x72, 0x21, 0x0b, 0x38, 0xce, 0xcb, 0x80, 0x3c, 0xa3, 0x4d, 0x98, 0x23, 0x5d, 0xe7,
|
|
0xcc, 0x23, 0xcd, 0xc8, 0xf7, 0x98, 0xe3, 0xe2, 0xa2, 0x2c, 0x3b, 0xab, 0xc0, 0x53, 0x89, 0xa1,
|
|
0x67, 0xb0, 0x12, 0x27, 0xb5, 0x58, 0xa7, 0x43, 0xba, 0xbc, 0xe9, 0xf8, 0x7e, 0xc0, 0x7a, 0x8e,
|
|
0x87, 0x67, 0x65, 0xfa, 0x92, 0x0a, 0x1f, 0xa8, 0x68, 0x3d, 0x0e, 0xa2, 0x97, 0x00, 0xad, 0x80,
|
|
0x38, 0x9c, 0xb8, 0x4d, 0x87, 0xe3, 0x82, 0xa9, 0x55, 0x8a, 0xbb, 0x46, 0x55, 0xcd, 0xb9, 0x9a,
|
|
0xcc, 0xb9, 0xfa, 0x36, 0x59, 0xde, 0x7e, 0xee, 0xea, 0xd7, 0x86, 0x66, 0x17, 0x62, 0x4e, 0x9d,
|
|
0x0b, 0x81, 0xc8, 0x77, 0x13, 0x01, 0xf8, 0x57, 0x81, 0x98, 0x53, 0xe7, 0xd6, 0x16, 0xa0, 0x43,
|
|
0xe2, 0x11, 0x4e, 0xe4, 0xf2, 0x6c, 0xf2, 0x29, 0x22, 0x21, 0x1f, 0xec, 0x30, 0xab, 0x76, 0x68,
|
|
0x3d, 0x87, 0x85, 0x63, 0xc2, 0xef, 0x4d, 0x79, 0x70, 0xcd, 0x16, 0x87, 0xc5, 0xd7, 0x34, 0x4c,
|
|
0x31, 0x2f, 0x14, 0xb3, 0x60, 0x67, 0x2e, 0x5c, 0x31, 0x75, 0xdf, 0x69, 0x2b, 0x62, 0xd6, 0x96,
|
|
0x67, 0xb9, 0x09, 0x7a, 0x49, 0xa4, 0x3b, 0xb2, 0xb6, 0x3c, 0x0f, 0xb6, 0x93, 0x93, 0x4c, 0xb5,
|
|
0x9d, 0x12, 0xe8, 0xe7, 0x94, 0x78, 0x2e, 0xd6, 0xcd, 0xac, 0xa8, 0x2a, 0x2f, 0xd6, 0x2b, 0x98,
|
|
0x1f, 0xaa, 0xea, 0x7b, 0x7d, 0xb4, 0x09, 0xba, 0xfc, 0x4e, 0xe4, 0x9b, 0x8a, 0xbb, 0x73, 0x55,
|
|
0xf5, 0xa1, 0x54, 0x55, 0x8a, 0x8a, 0xc9, 0x27, 0x30, 0xee, 0x78, 0x71, 0x27, 0xea, 0x62, 0x3d,
|
|
0x86, 0xd5, 0xe4, 0xed, 0x27, 0x24, 0xe8, 0xd0, 0x30, 0xa4, 0xac, 0x3b, 0x61, 0x0a, 0xd6, 0x47,
|
|
0x58, 0x3b, 0x95, 0xb3, 0x9d, 0x90, 0xbf, 0x0a, 0x79, 0x59, 0xab, 0x39, 0x60, 0xcd, 0xc8, 0x7b,
|
|
0xc3, 0x15, 0x46, 0xf3, 0x07, 0xf9, 0x22, 0x9e, 0x91, 0xe3, 0x9f, 0xbd, 0x03, 0x1b, 0x62, 0x11,
|
|
0x8b, 0x63, 0xca, 0x61, 0x9a, 0xa8, 0xa5, 0x89, 0xbb, 0x5f, 0x74, 0xc8, 0x4b, 0x66, 0xfd, 0xa4,
|
|
0x81, 0x8e, 0xa0, 0x78, 0x20, 0x2d, 0xa4, 0xbe, 0xd8, 0xd1, 0x69, 0x18, 0xa3, 0x57, 0x0b, 0x7f,
|
|
0xfe, 0xf1, 0xe7, 0x6b, 0x06, 0x59, 0x73, 0xb5, 0xe1, 0x1f, 0x9c, 0x3d, 0x6d, 0x1b, 0xbd, 0x81,
|
|
0xe2, 0xd0, 0x63, 0xc7, 0x65, 0x96, 0x53, 0x36, 0x3c, 0x12, 0xbf, 0x17, 0x89, 0x9e, 0x91, 0xd6,
|
|
0x7b, 0x07, 0xc5, 0x21, 0x2f, 0x22, 0x23, 0xd1, 0x4b, 0x1b, 0x74, 0xa2, 0xf8, 0x92, 0x14, 0x5f,
|
|
0xd8, 0x1e, 0x15, 0x47, 0x0d, 0xc8, 0x27, 0x3b, 0x44, 0x2b, 0x83, 0x36, 0x47, 0x1d, 0x3d, 0xfe,
|
|
0xee, 0x58, 0x0a, 0x8d, 0x49, 0xbd, 0x87, 0xc2, 0xc0, 0x5b, 0x08, 0x27, 0x94, 0x71, 0x93, 0x1b,
|
|
0xcb, 0xf7, 0x44, 0x7c, 0xaf, 0x6f, 0x19, 0x52, 0xb5, 0x84, 0xd0, 0x88, 0x6a, 0xcd, 0xa3, 0x21,
|
|
0x47, 0x21, 0xa0, 0xb4, 0xd3, 0xd0, 0xa3, 0xf1, 0x7e, 0x53, 0xae, 0x32, 0xf0, 0x48, 0xe7, 0x43,
|
|
0xde, 0xb0, 0x4c, 0x59, 0xce, 0x40, 0x78, 0xb4, 0xdc, 0x9d, 0x35, 0xd0, 0x25, 0x2c, 0xdd, 0xeb,
|
|
0x58, 0xb4, 0x95, 0x88, 0x3e, 0x64, 0xe8, 0x89, 0x8b, 0xd8, 0x94, 0x85, 0xd7, 0x8d, 0x89, 0x85,
|
|
0xf7, 0xb4, 0xed, 0xfd, 0xa7, 0xdf, 0x6f, 0xca, 0xda, 0xf5, 0x4d, 0x59, 0xfb, 0x7d, 0x53, 0xd6,
|
|
0xae, 0x6e, 0xcb, 0x53, 0xd7, 0xb7, 0xe5, 0xa9, 0x9f, 0xb7, 0xe5, 0x29, 0x88, 0xff, 0xc8, 0x4e,
|
|
0xb4, 0x0f, 0xff, 0x75, 0x58, 0x40, 0x5c, 0xd6, 0x8a, 0x75, 0x5e, 0xf4, 0x76, 0xce, 0xa6, 0x65,
|
|
0xad, 0x27, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x77, 0x34, 0x48, 0xfc, 0x02, 0x07, 0x00, 0x00,
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// GroupAPIClient is the client API for GroupAPI service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type GroupAPIClient interface {
|
|
// 创建用户组
|
|
CreateGroup(ctx context.Context, in *Group, opts ...grpc.CallOption) (*Group, error)
|
|
// 更新用户组
|
|
UpdateGroup(ctx context.Context, in *Group, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// 删除用户组
|
|
DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// 获取用户组
|
|
GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*Group, error)
|
|
// 获取用户组列表
|
|
ListGroup(ctx context.Context, in *ListGroupRequest, opts ...grpc.CallOption) (*ListGroupReply, error)
|
|
// 获取用户组权限列表
|
|
GetGroupPermission(ctx context.Context, in *GetGroupPermissionRequest, opts ...grpc.CallOption) (*GroupPermissions, error)
|
|
// 更新用户组权限,给用户组设置权限
|
|
UpdateGroupPermission(ctx context.Context, in *UpdateGroupPermissionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
}
|
|
|
|
type groupAPIClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewGroupAPIClient(cc *grpc.ClientConn) GroupAPIClient {
|
|
return &groupAPIClient{cc}
|
|
}
|
|
|
|
func (c *groupAPIClient) CreateGroup(ctx context.Context, in *Group, opts ...grpc.CallOption) (*Group, error) {
|
|
out := new(Group)
|
|
err := c.cc.Invoke(ctx, "/api.v1.GroupAPI/CreateGroup", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *groupAPIClient) UpdateGroup(ctx context.Context, in *Group, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/api.v1.GroupAPI/UpdateGroup", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *groupAPIClient) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/api.v1.GroupAPI/DeleteGroup", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *groupAPIClient) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*Group, error) {
|
|
out := new(Group)
|
|
err := c.cc.Invoke(ctx, "/api.v1.GroupAPI/GetGroup", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *groupAPIClient) ListGroup(ctx context.Context, in *ListGroupRequest, opts ...grpc.CallOption) (*ListGroupReply, error) {
|
|
out := new(ListGroupReply)
|
|
err := c.cc.Invoke(ctx, "/api.v1.GroupAPI/ListGroup", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *groupAPIClient) GetGroupPermission(ctx context.Context, in *GetGroupPermissionRequest, opts ...grpc.CallOption) (*GroupPermissions, error) {
|
|
out := new(GroupPermissions)
|
|
err := c.cc.Invoke(ctx, "/api.v1.GroupAPI/GetGroupPermission", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *groupAPIClient) UpdateGroupPermission(ctx context.Context, in *UpdateGroupPermissionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/api.v1.GroupAPI/UpdateGroupPermission", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// GroupAPIServer is the server API for GroupAPI service.
|
|
type GroupAPIServer interface {
|
|
// 创建用户组
|
|
CreateGroup(context.Context, *Group) (*Group, error)
|
|
// 更新用户组
|
|
UpdateGroup(context.Context, *Group) (*emptypb.Empty, error)
|
|
// 删除用户组
|
|
DeleteGroup(context.Context, *DeleteGroupRequest) (*emptypb.Empty, error)
|
|
// 获取用户组
|
|
GetGroup(context.Context, *GetGroupRequest) (*Group, error)
|
|
// 获取用户组列表
|
|
ListGroup(context.Context, *ListGroupRequest) (*ListGroupReply, error)
|
|
// 获取用户组权限列表
|
|
GetGroupPermission(context.Context, *GetGroupPermissionRequest) (*GroupPermissions, error)
|
|
// 更新用户组权限,给用户组设置权限
|
|
UpdateGroupPermission(context.Context, *UpdateGroupPermissionRequest) (*emptypb.Empty, error)
|
|
}
|
|
|
|
// UnimplementedGroupAPIServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedGroupAPIServer struct {
|
|
}
|
|
|
|
func (*UnimplementedGroupAPIServer) CreateGroup(ctx context.Context, req *Group) (*Group, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented")
|
|
}
|
|
func (*UnimplementedGroupAPIServer) UpdateGroup(ctx context.Context, req *Group) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented")
|
|
}
|
|
func (*UnimplementedGroupAPIServer) DeleteGroup(ctx context.Context, req *DeleteGroupRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteGroup not implemented")
|
|
}
|
|
func (*UnimplementedGroupAPIServer) GetGroup(ctx context.Context, req *GetGroupRequest) (*Group, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetGroup not implemented")
|
|
}
|
|
func (*UnimplementedGroupAPIServer) ListGroup(ctx context.Context, req *ListGroupRequest) (*ListGroupReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListGroup not implemented")
|
|
}
|
|
func (*UnimplementedGroupAPIServer) GetGroupPermission(ctx context.Context, req *GetGroupPermissionRequest) (*GroupPermissions, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetGroupPermission not implemented")
|
|
}
|
|
func (*UnimplementedGroupAPIServer) UpdateGroupPermission(ctx context.Context, req *UpdateGroupPermissionRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupPermission not implemented")
|
|
}
|
|
|
|
func RegisterGroupAPIServer(s *grpc.Server, srv GroupAPIServer) {
|
|
s.RegisterService(&_GroupAPI_serviceDesc, srv)
|
|
}
|
|
|
|
func _GroupAPI_CreateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Group)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(GroupAPIServer).CreateGroup(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.v1.GroupAPI/CreateGroup",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(GroupAPIServer).CreateGroup(ctx, req.(*Group))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _GroupAPI_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Group)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(GroupAPIServer).UpdateGroup(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.v1.GroupAPI/UpdateGroup",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(GroupAPIServer).UpdateGroup(ctx, req.(*Group))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _GroupAPI_DeleteGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteGroupRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(GroupAPIServer).DeleteGroup(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.v1.GroupAPI/DeleteGroup",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(GroupAPIServer).DeleteGroup(ctx, req.(*DeleteGroupRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _GroupAPI_GetGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetGroupRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(GroupAPIServer).GetGroup(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.v1.GroupAPI/GetGroup",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(GroupAPIServer).GetGroup(ctx, req.(*GetGroupRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _GroupAPI_ListGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListGroupRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(GroupAPIServer).ListGroup(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.v1.GroupAPI/ListGroup",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(GroupAPIServer).ListGroup(ctx, req.(*ListGroupRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _GroupAPI_GetGroupPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetGroupPermissionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(GroupAPIServer).GetGroupPermission(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.v1.GroupAPI/GetGroupPermission",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(GroupAPIServer).GetGroupPermission(ctx, req.(*GetGroupPermissionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _GroupAPI_UpdateGroupPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateGroupPermissionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(GroupAPIServer).UpdateGroupPermission(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.v1.GroupAPI/UpdateGroupPermission",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(GroupAPIServer).UpdateGroupPermission(ctx, req.(*UpdateGroupPermissionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _GroupAPI_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "api.v1.GroupAPI",
|
|
HandlerType: (*GroupAPIServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "CreateGroup",
|
|
Handler: _GroupAPI_CreateGroup_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateGroup",
|
|
Handler: _GroupAPI_UpdateGroup_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteGroup",
|
|
Handler: _GroupAPI_DeleteGroup_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetGroup",
|
|
Handler: _GroupAPI_GetGroup_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListGroup",
|
|
Handler: _GroupAPI_ListGroup_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetGroupPermission",
|
|
Handler: _GroupAPI_GetGroupPermission_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateGroupPermission",
|
|
Handler: _GroupAPI_UpdateGroupPermission_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "api/v1/group.proto",
|
|
}
|
|
|
|
func (m *Group) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Group) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Group) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.EnableCommentApproval {
|
|
i--
|
|
if m.EnableCommentApproval {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x60
|
|
}
|
|
if m.EnableUpload {
|
|
i--
|
|
if m.EnableUpload {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x58
|
|
}
|
|
if m.UpdatedAt != nil {
|
|
n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.UpdatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt):])
|
|
if err1 != nil {
|
|
return 0, err1
|
|
}
|
|
i -= n1
|
|
i = encodeVarintGroup(dAtA, i, uint64(n1))
|
|
i--
|
|
dAtA[i] = 0x52
|
|
}
|
|
if m.CreatedAt != nil {
|
|
n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt):])
|
|
if err2 != nil {
|
|
return 0, err2
|
|
}
|
|
i -= n2
|
|
i = encodeVarintGroup(dAtA, i, uint64(n2))
|
|
i--
|
|
dAtA[i] = 0x4a
|
|
}
|
|
if m.Sort != 0 {
|
|
i = encodeVarintGroup(dAtA, i, uint64(m.Sort))
|
|
i--
|
|
dAtA[i] = 0x40
|
|
}
|
|
if m.UserCount != 0 {
|
|
i = encodeVarintGroup(dAtA, i, uint64(m.UserCount))
|
|
i--
|
|
dAtA[i] = 0x38
|
|
}
|
|
if len(m.Description) > 0 {
|
|
i -= len(m.Description)
|
|
copy(dAtA[i:], m.Description)
|
|
i = encodeVarintGroup(dAtA, i, uint64(len(m.Description)))
|
|
i--
|
|
dAtA[i] = 0x32
|
|
}
|
|
if m.IsDisplay {
|
|
i--
|
|
if m.IsDisplay {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x28
|
|
}
|
|
if m.IsDefault {
|
|
i--
|
|
if m.IsDefault {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x20
|
|
}
|
|
if len(m.Color) > 0 {
|
|
i -= len(m.Color)
|
|
copy(dAtA[i:], m.Color)
|
|
i = encodeVarintGroup(dAtA, i, uint64(len(m.Color)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Title) > 0 {
|
|
i -= len(m.Title)
|
|
copy(dAtA[i:], m.Title)
|
|
i = encodeVarintGroup(dAtA, i, uint64(len(m.Title)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Id != 0 {
|
|
i = encodeVarintGroup(dAtA, i, uint64(m.Id))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *DeleteGroupRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *DeleteGroupRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *DeleteGroupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Id) > 0 {
|
|
dAtA4 := make([]byte, len(m.Id)*10)
|
|
var j3 int
|
|
for _, num1 := range m.Id {
|
|
num := uint64(num1)
|
|
for num >= 1<<7 {
|
|
dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j3++
|
|
}
|
|
dAtA4[j3] = uint8(num)
|
|
j3++
|
|
}
|
|
i -= j3
|
|
copy(dAtA[i:], dAtA4[:j3])
|
|
i = encodeVarintGroup(dAtA, i, uint64(j3))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *GetGroupRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *GetGroupRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *GetGroupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Title) > 0 {
|
|
i -= len(m.Title)
|
|
copy(dAtA[i:], m.Title)
|
|
i = encodeVarintGroup(dAtA, i, uint64(len(m.Title)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Id != 0 {
|
|
i = encodeVarintGroup(dAtA, i, uint64(m.Id))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ListGroupRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ListGroupRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ListGroupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Field) > 0 {
|
|
for iNdEx := len(m.Field) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.Field[iNdEx])
|
|
copy(dAtA[i:], m.Field[iNdEx])
|
|
i = encodeVarintGroup(dAtA, i, uint64(len(m.Field[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
}
|
|
if len(m.Sort) > 0 {
|
|
i -= len(m.Sort)
|
|
copy(dAtA[i:], m.Sort)
|
|
i = encodeVarintGroup(dAtA, i, uint64(len(m.Sort)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if m.Size_ != 0 {
|
|
i = encodeVarintGroup(dAtA, i, uint64(m.Size_))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if m.Page != 0 {
|
|
i = encodeVarintGroup(dAtA, i, uint64(m.Page))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if len(m.Wd) > 0 {
|
|
i -= len(m.Wd)
|
|
copy(dAtA[i:], m.Wd)
|
|
i = encodeVarintGroup(dAtA, i, uint64(len(m.Wd)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ListGroupReply) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ListGroupReply) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ListGroupReply) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Total != 0 {
|
|
i = encodeVarintGroup(dAtA, i, uint64(m.Total))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if len(m.Group) > 0 {
|
|
for iNdEx := len(m.Group) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Group[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintGroup(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *GetGroupPermissionRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *GetGroupPermissionRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *GetGroupPermissionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Id != 0 {
|
|
i = encodeVarintGroup(dAtA, i, uint64(m.Id))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *UpdateGroupPermissionRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *UpdateGroupPermissionRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *UpdateGroupPermissionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.PermissionId) > 0 {
|
|
dAtA6 := make([]byte, len(m.PermissionId)*10)
|
|
var j5 int
|
|
for _, num1 := range m.PermissionId {
|
|
num := uint64(num1)
|
|
for num >= 1<<7 {
|
|
dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j5++
|
|
}
|
|
dAtA6[j5] = uint8(num)
|
|
j5++
|
|
}
|
|
i -= j5
|
|
copy(dAtA[i:], dAtA6[:j5])
|
|
i = encodeVarintGroup(dAtA, i, uint64(j5))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.GroupId != 0 {
|
|
i = encodeVarintGroup(dAtA, i, uint64(m.GroupId))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *GroupPermissions) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *GroupPermissions) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *GroupPermissions) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.PermissionId) > 0 {
|
|
dAtA8 := make([]byte, len(m.PermissionId)*10)
|
|
var j7 int
|
|
for _, num1 := range m.PermissionId {
|
|
num := uint64(num1)
|
|
for num >= 1<<7 {
|
|
dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j7++
|
|
}
|
|
dAtA8[j7] = uint8(num)
|
|
j7++
|
|
}
|
|
i -= j7
|
|
copy(dAtA[i:], dAtA8[:j7])
|
|
i = encodeVarintGroup(dAtA, i, uint64(j7))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintGroup(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovGroup(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *Group) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Id != 0 {
|
|
n += 1 + sovGroup(uint64(m.Id))
|
|
}
|
|
l = len(m.Title)
|
|
if l > 0 {
|
|
n += 1 + l + sovGroup(uint64(l))
|
|
}
|
|
l = len(m.Color)
|
|
if l > 0 {
|
|
n += 1 + l + sovGroup(uint64(l))
|
|
}
|
|
if m.IsDefault {
|
|
n += 2
|
|
}
|
|
if m.IsDisplay {
|
|
n += 2
|
|
}
|
|
l = len(m.Description)
|
|
if l > 0 {
|
|
n += 1 + l + sovGroup(uint64(l))
|
|
}
|
|
if m.UserCount != 0 {
|
|
n += 1 + sovGroup(uint64(m.UserCount))
|
|
}
|
|
if m.Sort != 0 {
|
|
n += 1 + sovGroup(uint64(m.Sort))
|
|
}
|
|
if m.CreatedAt != nil {
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt)
|
|
n += 1 + l + sovGroup(uint64(l))
|
|
}
|
|
if m.UpdatedAt != nil {
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt)
|
|
n += 1 + l + sovGroup(uint64(l))
|
|
}
|
|
if m.EnableUpload {
|
|
n += 2
|
|
}
|
|
if m.EnableCommentApproval {
|
|
n += 2
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *DeleteGroupRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Id) > 0 {
|
|
l = 0
|
|
for _, e := range m.Id {
|
|
l += sovGroup(uint64(e))
|
|
}
|
|
n += 1 + sovGroup(uint64(l)) + l
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetGroupRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Id != 0 {
|
|
n += 1 + sovGroup(uint64(m.Id))
|
|
}
|
|
l = len(m.Title)
|
|
if l > 0 {
|
|
n += 1 + l + sovGroup(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListGroupRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Wd)
|
|
if l > 0 {
|
|
n += 1 + l + sovGroup(uint64(l))
|
|
}
|
|
if m.Page != 0 {
|
|
n += 1 + sovGroup(uint64(m.Page))
|
|
}
|
|
if m.Size_ != 0 {
|
|
n += 1 + sovGroup(uint64(m.Size_))
|
|
}
|
|
l = len(m.Sort)
|
|
if l > 0 {
|
|
n += 1 + l + sovGroup(uint64(l))
|
|
}
|
|
if len(m.Field) > 0 {
|
|
for _, s := range m.Field {
|
|
l = len(s)
|
|
n += 1 + l + sovGroup(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListGroupReply) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Group) > 0 {
|
|
for _, e := range m.Group {
|
|
l = e.Size()
|
|
n += 1 + l + sovGroup(uint64(l))
|
|
}
|
|
}
|
|
if m.Total != 0 {
|
|
n += 1 + sovGroup(uint64(m.Total))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetGroupPermissionRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Id != 0 {
|
|
n += 1 + sovGroup(uint64(m.Id))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *UpdateGroupPermissionRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.GroupId != 0 {
|
|
n += 1 + sovGroup(uint64(m.GroupId))
|
|
}
|
|
if len(m.PermissionId) > 0 {
|
|
l = 0
|
|
for _, e := range m.PermissionId {
|
|
l += sovGroup(uint64(e))
|
|
}
|
|
n += 1 + sovGroup(uint64(l)) + l
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GroupPermissions) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.PermissionId) > 0 {
|
|
l = 0
|
|
for _, e := range m.PermissionId {
|
|
l += sovGroup(uint64(e))
|
|
}
|
|
n += 1 + sovGroup(uint64(l)) + l
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovGroup(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozGroup(x uint64) (n int) {
|
|
return sovGroup(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *Group) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Group: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Group: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
m.Id = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Id |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Title = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Color", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Color = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field IsDefault", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.IsDefault = bool(v != 0)
|
|
case 5:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field IsDisplay", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.IsDisplay = bool(v != 0)
|
|
case 6:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Description = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 7:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field UserCount", wireType)
|
|
}
|
|
m.UserCount = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.UserCount |= int32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 8:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Sort", wireType)
|
|
}
|
|
m.Sort = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Sort |= int32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 9:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.CreatedAt == nil {
|
|
m.CreatedAt = new(time.Time)
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 10:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.UpdatedAt == nil {
|
|
m.UpdatedAt = new(time.Time)
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 11:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field EnableUpload", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.EnableUpload = bool(v != 0)
|
|
case 12:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field EnableCommentApproval", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.EnableCommentApproval = bool(v != 0)
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipGroup(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *DeleteGroupRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: DeleteGroupRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: DeleteGroupRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType == 0 {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Id = append(m.Id, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var elementCount int
|
|
var count int
|
|
for _, integer := range dAtA[iNdEx:postIndex] {
|
|
if integer < 128 {
|
|
count++
|
|
}
|
|
}
|
|
elementCount = count
|
|
if elementCount != 0 && len(m.Id) == 0 {
|
|
m.Id = make([]int64, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Id = append(m.Id, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipGroup(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetGroupRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: GetGroupRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetGroupRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
m.Id = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Id |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Title = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipGroup(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListGroupRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ListGroupRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListGroupRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Wd", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Wd = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType)
|
|
}
|
|
m.Page = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Page |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType)
|
|
}
|
|
m.Size_ = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Size_ |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Sort", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Sort = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Field = append(m.Field, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipGroup(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListGroupReply) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ListGroupReply: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListGroupReply: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Group = append(m.Group, &Group{})
|
|
if err := m.Group[len(m.Group)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType)
|
|
}
|
|
m.Total = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Total |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipGroup(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetGroupPermissionRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: GetGroupPermissionRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetGroupPermissionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
m.Id = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Id |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipGroup(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *UpdateGroupPermissionRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: UpdateGroupPermissionRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: UpdateGroupPermissionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType)
|
|
}
|
|
m.GroupId = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.GroupId |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType == 0 {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.PermissionId = append(m.PermissionId, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var elementCount int
|
|
var count int
|
|
for _, integer := range dAtA[iNdEx:postIndex] {
|
|
if integer < 128 {
|
|
count++
|
|
}
|
|
}
|
|
elementCount = count
|
|
if elementCount != 0 && len(m.PermissionId) == 0 {
|
|
m.PermissionId = make([]int64, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.PermissionId = append(m.PermissionId, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field PermissionId", wireType)
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipGroup(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GroupPermissions) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: GroupPermissions: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GroupPermissions: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType == 0 {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.PermissionId = append(m.PermissionId, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var elementCount int
|
|
var count int
|
|
for _, integer := range dAtA[iNdEx:postIndex] {
|
|
if integer < 128 {
|
|
count++
|
|
}
|
|
}
|
|
elementCount = count
|
|
if elementCount != 0 && len(m.PermissionId) == 0 {
|
|
m.PermissionId = make([]int64, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.PermissionId = append(m.PermissionId, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field PermissionId", wireType)
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipGroup(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthGroup
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipGroup(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowGroup
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthGroup
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupGroup
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthGroup
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthGroup = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowGroup = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupGroup = fmt.Errorf("proto: unexpected end of group")
|
|
)
|