ProtoUsers

package
v0.0.0-...-8e1814b Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProtoUsersHandler

func RegisterProtoUsersHandler(s server.Server, hdlr ProtoUsersHandler, opts ...server.HandlerOption) error

Types

type AddRequest

type AddRequest struct {
	Model                *User    `protobuf:"bytes,1,opt,name=Model,proto3" json:"Model,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AddRequest) Descriptor

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

func (*AddRequest) GetModel

func (m *AddRequest) GetModel() *User

func (*AddRequest) ProtoMessage

func (*AddRequest) ProtoMessage()

func (*AddRequest) Reset

func (m *AddRequest) Reset()

func (*AddRequest) String

func (m *AddRequest) String() string

func (*AddRequest) XXX_DiscardUnknown

func (m *AddRequest) XXX_DiscardUnknown()

func (*AddRequest) XXX_Marshal

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

func (*AddRequest) XXX_Merge

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

func (*AddRequest) XXX_Size

func (m *AddRequest) XXX_Size() int

func (*AddRequest) XXX_Unmarshal

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

type AddResponse

type AddResponse struct {
	NewID                int64    `protobuf:"varint,1,opt,name=NewID,proto3" json:"NewID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AddResponse) Descriptor

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

func (*AddResponse) GetNewID

func (m *AddResponse) GetNewID() int64

func (*AddResponse) ProtoMessage

func (*AddResponse) ProtoMessage()

func (*AddResponse) Reset

func (m *AddResponse) Reset()

func (*AddResponse) String

func (m *AddResponse) String() string

func (*AddResponse) XXX_DiscardUnknown

func (m *AddResponse) XXX_DiscardUnknown()

func (*AddResponse) XXX_Marshal

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

func (*AddResponse) XXX_Merge

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

func (*AddResponse) XXX_Size

func (m *AddResponse) XXX_Size() int

func (*AddResponse) XXX_Unmarshal

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

type DeleteRequest

type DeleteRequest struct {
	IDArray              []int64  `protobuf:"varint,1,rep,packed,name=IDArray,proto3" json:"IDArray,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DeleteRequest) Descriptor

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

func (*DeleteRequest) GetIDArray

func (m *DeleteRequest) GetIDArray() []int64

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) Reset

func (m *DeleteRequest) Reset()

func (*DeleteRequest) String

func (m *DeleteRequest) String() string

func (*DeleteRequest) XXX_DiscardUnknown

func (m *DeleteRequest) XXX_DiscardUnknown()

func (*DeleteRequest) XXX_Marshal

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

func (*DeleteRequest) XXX_Merge

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

func (*DeleteRequest) XXX_Size

func (m *DeleteRequest) XXX_Size() int

func (*DeleteRequest) XXX_Unmarshal

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

type DeleteResponse

type DeleteResponse struct {
	// 是否删除成功,批量删除不需要返回值
	Deleted              int64    `protobuf:"varint,1,opt,name=Deleted,proto3" json:"Deleted,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DeleteResponse) Descriptor

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

func (*DeleteResponse) GetDeleted

func (m *DeleteResponse) GetDeleted() int64

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) Reset

func (m *DeleteResponse) Reset()

func (*DeleteResponse) String

func (m *DeleteResponse) String() string

func (*DeleteResponse) XXX_DiscardUnknown

func (m *DeleteResponse) XXX_DiscardUnknown()

func (*DeleteResponse) XXX_Marshal

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

func (*DeleteResponse) XXX_Merge

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

func (*DeleteResponse) XXX_Size

func (m *DeleteResponse) XXX_Size() int

func (*DeleteResponse) XXX_Unmarshal

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

type GetListRequest

type GetListRequest struct {
	PageSize             int64    `protobuf:"varint,1,opt,name=PageSize,proto3" json:"PageSize,omitempty"`
	CurrentPageIndex     int64    `protobuf:"varint,2,opt,name=CurrentPageIndex,proto3" json:"CurrentPageIndex,omitempty"`
	OrderBy              string   `protobuf:"bytes,3,opt,name=OrderBy,proto3" json:"OrderBy,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetListRequest) Descriptor

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

func (*GetListRequest) GetCurrentPageIndex

func (m *GetListRequest) GetCurrentPageIndex() int64

func (*GetListRequest) GetOrderBy

func (m *GetListRequest) GetOrderBy() string

func (*GetListRequest) GetPageSize

func (m *GetListRequest) GetPageSize() int64

func (*GetListRequest) ProtoMessage

func (*GetListRequest) ProtoMessage()

func (*GetListRequest) Reset

func (m *GetListRequest) Reset()

func (*GetListRequest) String

func (m *GetListRequest) String() string

func (*GetListRequest) XXX_DiscardUnknown

func (m *GetListRequest) XXX_DiscardUnknown()

func (*GetListRequest) XXX_Marshal

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

func (*GetListRequest) XXX_Merge

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

func (*GetListRequest) XXX_Size

func (m *GetListRequest) XXX_Size() int

func (*GetListRequest) XXX_Unmarshal

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

type GetListResponse

type GetListResponse struct {
	TotalCount           int64    `protobuf:"varint,1,opt,name=TotalCount,proto3" json:"TotalCount,omitempty"`
	List                 []*User  `protobuf:"bytes,2,rep,name=List,proto3" json:"List,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetListResponse) Descriptor

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

func (*GetListResponse) GetList

func (m *GetListResponse) GetList() []*User

func (*GetListResponse) GetTotalCount

func (m *GetListResponse) GetTotalCount() int64

func (*GetListResponse) ProtoMessage

func (*GetListResponse) ProtoMessage()

func (*GetListResponse) Reset

func (m *GetListResponse) Reset()

func (*GetListResponse) String

func (m *GetListResponse) String() string

func (*GetListResponse) XXX_DiscardUnknown

func (m *GetListResponse) XXX_DiscardUnknown()

func (*GetListResponse) XXX_Marshal

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

func (*GetListResponse) XXX_Merge

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

func (*GetListResponse) XXX_Size

func (m *GetListResponse) XXX_Size() int

func (*GetListResponse) XXX_Unmarshal

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

type GetRequest

type GetRequest struct {
	ID                   int64    `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	UserName             string   `protobuf:"bytes,2,opt,name=UserName,proto3" json:"UserName,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetRequest) Descriptor

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

func (*GetRequest) GetID

func (m *GetRequest) GetID() int64

func (*GetRequest) GetUserName

func (m *GetRequest) GetUserName() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) String

func (m *GetRequest) String() string

func (*GetRequest) XXX_DiscardUnknown

func (m *GetRequest) XXX_DiscardUnknown()

func (*GetRequest) XXX_Marshal

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

func (*GetRequest) XXX_Merge

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

func (*GetRequest) XXX_Size

func (m *GetRequest) XXX_Size() int

func (*GetRequest) XXX_Unmarshal

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

type GetResponse

type GetResponse struct {
	Model                *User    `protobuf:"bytes,1,opt,name=Model,proto3" json:"Model,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetResponse) Descriptor

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

func (*GetResponse) GetModel

func (m *GetResponse) GetModel() *User

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) Reset

func (m *GetResponse) Reset()

func (*GetResponse) String

func (m *GetResponse) String() string

func (*GetResponse) XXX_DiscardUnknown

func (m *GetResponse) XXX_DiscardUnknown()

func (*GetResponse) XXX_Marshal

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

func (*GetResponse) XXX_Merge

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

func (*GetResponse) XXX_Size

func (m *GetResponse) XXX_Size() int

func (*GetResponse) XXX_Unmarshal

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

type ProtoUsersHandler

type ProtoUsersHandler interface {
	// 添回
	Add(context.Context, *AddRequest, *AddResponse) error
	// 获取列表
	GetList(context.Context, *GetListRequest, *GetListResponse) error
	// 获取单个记录
	Get(context.Context, *GetRequest, *GetResponse) error
	// 修改
	Update(context.Context, *UpdateRequest, *UpdateResponse) error
	// 批量删除(假删除)
	BatchDelete(context.Context, *DeleteRequest, *DeleteResponse) error
}

type ProtoUsersService

type ProtoUsersService interface {
	// 添回
	Add(ctx context.Context, in *AddRequest, opts ...client.CallOption) (*AddResponse, error)
	// 获取列表
	GetList(ctx context.Context, in *GetListRequest, opts ...client.CallOption) (*GetListResponse, error)
	// 获取单个记录
	Get(ctx context.Context, in *GetRequest, opts ...client.CallOption) (*GetResponse, error)
	// 修改
	Update(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*UpdateResponse, error)
	// 批量删除(假删除)
	BatchDelete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
}

func NewProtoUsersService

func NewProtoUsersService(name string, c client.Client) ProtoUsersService

type UpdateRequest

type UpdateRequest struct {
	Model                *User    `protobuf:"bytes,1,opt,name=Model,proto3" json:"Model,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UpdateRequest) Descriptor

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

func (*UpdateRequest) GetModel

func (m *UpdateRequest) GetModel() *User

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) Reset

func (m *UpdateRequest) Reset()

func (*UpdateRequest) String

func (m *UpdateRequest) String() string

func (*UpdateRequest) XXX_DiscardUnknown

func (m *UpdateRequest) XXX_DiscardUnknown()

func (*UpdateRequest) XXX_Marshal

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

func (*UpdateRequest) XXX_Merge

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

func (*UpdateRequest) XXX_Size

func (m *UpdateRequest) XXX_Size() int

func (*UpdateRequest) XXX_Unmarshal

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

type UpdateResponse

type UpdateResponse struct {
	// 是否更新成功
	Updated              int64    `protobuf:"varint,1,opt,name=Updated,proto3" json:"Updated,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UpdateResponse) Descriptor

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

func (*UpdateResponse) GetUpdated

func (m *UpdateResponse) GetUpdated() int64

func (*UpdateResponse) ProtoMessage

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) Reset

func (m *UpdateResponse) Reset()

func (*UpdateResponse) String

func (m *UpdateResponse) String() string

func (*UpdateResponse) XXX_DiscardUnknown

func (m *UpdateResponse) XXX_DiscardUnknown()

func (*UpdateResponse) XXX_Marshal

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

func (*UpdateResponse) XXX_Merge

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

func (*UpdateResponse) XXX_Size

func (m *UpdateResponse) XXX_Size() int

func (*UpdateResponse) XXX_Unmarshal

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

type User

type User struct {
	// 编号Id
	ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// 用户名称
	UserName string `protobuf:"bytes,2,opt,name=UserName,proto3" json:"UserName,omitempty"`
	// 真实姓名或昵称
	RealyName string `protobuf:"bytes,3,opt,name=RealyName,proto3" json:"RealyName,omitempty"`
	// 密码
	Password string `protobuf:"bytes,4,opt,name=Password,proto3" json:"Password,omitempty"`
	// authkey
	AuthKey string `protobuf:"bytes,5,opt,name=AuthKey,proto3" json:"AuthKey,omitempty"`
	// Email
	Email string `protobuf:"bytes,6,opt,name=Email,proto3" json:"Email,omitempty"`
	// 是否删除
	IsDel int64 `protobuf:"varint,7,opt,name=IsDel,proto3" json:"IsDel,omitempty"`
	// 备注
	Note                 string   `protobuf:"bytes,8,opt,name=Note,proto3" json:"Note,omitempty"`
	ParentID             int64    `protobuf:"varint,9,opt,name=ParentID,proto3" json:"ParentID,omitempty"`
	CreateTime           int64    `protobuf:"varint,10,opt,name=CreateTime,proto3" json:"CreateTime,omitempty"`
	LastUpdateTime       int64    `protobuf:"varint,11,opt,name=LastUpdateTime,proto3" json:"LastUpdateTime,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*User) Descriptor

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

func (*User) GetAuthKey

func (m *User) GetAuthKey() string

func (*User) GetCreateTime

func (m *User) GetCreateTime() int64

func (*User) GetEmail

func (m *User) GetEmail() string

func (*User) GetID

func (m *User) GetID() int64

func (*User) GetIsDel

func (m *User) GetIsDel() int64

func (*User) GetLastUpdateTime

func (m *User) GetLastUpdateTime() int64

func (*User) GetNote

func (m *User) GetNote() string

func (*User) GetParentID

func (m *User) GetParentID() int64

func (*User) GetPassword

func (m *User) GetPassword() string

func (*User) GetRealyName

func (m *User) GetRealyName() string

func (*User) GetUserName

func (m *User) GetUserName() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

func (*User) XXX_DiscardUnknown

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal

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

func (*User) XXX_Merge

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

func (*User) XXX_Size

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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