649 lines
22 KiB
Go
649 lines
22 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: users_service.proto
|
|
|
|
package grpc
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type ListUsersRequest_SortCol int32
|
|
|
|
const (
|
|
ListUsersRequest_ID_ASC ListUsersRequest_SortCol = 0
|
|
ListUsersRequest_ID_DESC ListUsersRequest_SortCol = 1
|
|
ListUsersRequest_NAME_ASC ListUsersRequest_SortCol = 2
|
|
ListUsersRequest_NAME_DESC ListUsersRequest_SortCol = 3
|
|
)
|
|
|
|
var ListUsersRequest_SortCol_name = map[int32]string{
|
|
0: "ID_ASC",
|
|
1: "ID_DESC",
|
|
2: "NAME_ASC",
|
|
3: "NAME_DESC",
|
|
}
|
|
var ListUsersRequest_SortCol_value = map[string]int32{
|
|
"ID_ASC": 0,
|
|
"ID_DESC": 1,
|
|
"NAME_ASC": 2,
|
|
"NAME_DESC": 3,
|
|
}
|
|
|
|
func (x ListUsersRequest_SortCol) String() string {
|
|
return proto.EnumName(ListUsersRequest_SortCol_name, int32(x))
|
|
}
|
|
func (ListUsersRequest_SortCol) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_users_service_dc0ff1c6dd633c02, []int{2, 0}
|
|
}
|
|
|
|
type GetUserByIDRequest struct {
|
|
UserID uint64 `protobuf:"varint,1,opt,name=userID,proto3" json:"userID,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *GetUserByIDRequest) Reset() { *m = GetUserByIDRequest{} }
|
|
func (m *GetUserByIDRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*GetUserByIDRequest) ProtoMessage() {}
|
|
func (*GetUserByIDRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_users_service_dc0ff1c6dd633c02, []int{0}
|
|
}
|
|
func (m *GetUserByIDRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_GetUserByIDRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *GetUserByIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_GetUserByIDRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *GetUserByIDRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GetUserByIDRequest.Merge(dst, src)
|
|
}
|
|
func (m *GetUserByIDRequest) XXX_Size() int {
|
|
return xxx_messageInfo_GetUserByIDRequest.Size(m)
|
|
}
|
|
func (m *GetUserByIDRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GetUserByIDRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GetUserByIDRequest proto.InternalMessageInfo
|
|
|
|
func (m *GetUserByIDRequest) GetUserID() uint64 {
|
|
if m != nil {
|
|
return m.UserID
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetUserByIDResponse struct {
|
|
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *GetUserByIDResponse) Reset() { *m = GetUserByIDResponse{} }
|
|
func (m *GetUserByIDResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*GetUserByIDResponse) ProtoMessage() {}
|
|
func (*GetUserByIDResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_users_service_dc0ff1c6dd633c02, []int{1}
|
|
}
|
|
func (m *GetUserByIDResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_GetUserByIDResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *GetUserByIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_GetUserByIDResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *GetUserByIDResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GetUserByIDResponse.Merge(dst, src)
|
|
}
|
|
func (m *GetUserByIDResponse) XXX_Size() int {
|
|
return xxx_messageInfo_GetUserByIDResponse.Size(m)
|
|
}
|
|
func (m *GetUserByIDResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GetUserByIDResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GetUserByIDResponse proto.InternalMessageInfo
|
|
|
|
func (m *GetUserByIDResponse) GetUser() *User {
|
|
if m != nil {
|
|
return m.User
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ListUsersRequest struct {
|
|
Filter *UsersFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
|
|
Page uint64 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
|
|
PerPage uint64 `protobuf:"varint,3,opt,name=per_page,json=perPage,proto3" json:"per_page,omitempty"`
|
|
Sort ListUsersRequest_SortCol `protobuf:"varint,4,opt,name=sort,proto3,enum=usersservice.ListUsersRequest_SortCol" json:"sort,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ListUsersRequest) Reset() { *m = ListUsersRequest{} }
|
|
func (m *ListUsersRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ListUsersRequest) ProtoMessage() {}
|
|
func (*ListUsersRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_users_service_dc0ff1c6dd633c02, []int{2}
|
|
}
|
|
func (m *ListUsersRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ListUsersRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *ListUsersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ListUsersRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *ListUsersRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ListUsersRequest.Merge(dst, src)
|
|
}
|
|
func (m *ListUsersRequest) XXX_Size() int {
|
|
return xxx_messageInfo_ListUsersRequest.Size(m)
|
|
}
|
|
func (m *ListUsersRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ListUsersRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ListUsersRequest proto.InternalMessageInfo
|
|
|
|
func (m *ListUsersRequest) GetFilter() *UsersFilter {
|
|
if m != nil {
|
|
return m.Filter
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ListUsersRequest) GetPage() uint64 {
|
|
if m != nil {
|
|
return m.Page
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ListUsersRequest) GetPerPage() uint64 {
|
|
if m != nil {
|
|
return m.PerPage
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ListUsersRequest) GetSort() ListUsersRequest_SortCol {
|
|
if m != nil {
|
|
return m.Sort
|
|
}
|
|
return ListUsersRequest_ID_ASC
|
|
}
|
|
|
|
type ListUsersResponse struct {
|
|
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
|
|
Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ListUsersResponse) Reset() { *m = ListUsersResponse{} }
|
|
func (m *ListUsersResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*ListUsersResponse) ProtoMessage() {}
|
|
func (*ListUsersResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_users_service_dc0ff1c6dd633c02, []int{3}
|
|
}
|
|
func (m *ListUsersResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ListUsersResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *ListUsersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ListUsersResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *ListUsersResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ListUsersResponse.Merge(dst, src)
|
|
}
|
|
func (m *ListUsersResponse) XXX_Size() int {
|
|
return xxx_messageInfo_ListUsersResponse.Size(m)
|
|
}
|
|
func (m *ListUsersResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ListUsersResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ListUsersResponse proto.InternalMessageInfo
|
|
|
|
func (m *ListUsersResponse) GetUsers() []*User {
|
|
if m != nil {
|
|
return m.Users
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ListUsersResponse) GetCount() uint64 {
|
|
if m != nil {
|
|
return m.Count
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Empty struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Empty) Reset() { *m = Empty{} }
|
|
func (m *Empty) String() string { return proto.CompactTextString(m) }
|
|
func (*Empty) ProtoMessage() {}
|
|
func (*Empty) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_users_service_dc0ff1c6dd633c02, []int{4}
|
|
}
|
|
func (m *Empty) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_Empty.Unmarshal(m, b)
|
|
}
|
|
func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_Empty.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *Empty) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Empty.Merge(dst, src)
|
|
}
|
|
func (m *Empty) XXX_Size() int {
|
|
return xxx_messageInfo_Empty.Size(m)
|
|
}
|
|
func (m *Empty) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Empty.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Empty proto.InternalMessageInfo
|
|
|
|
type User struct {
|
|
UserID uint64 `protobuf:"varint,1,opt,name=userID,proto3" json:"userID,omitempty"`
|
|
UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"`
|
|
FirstName string `protobuf:"bytes,3,opt,name=firstName,proto3" json:"firstName,omitempty"`
|
|
LastName string `protobuf:"bytes,4,opt,name=lastName,proto3" json:"lastName,omitempty"`
|
|
Company *Company `protobuf:"bytes,5,opt,name=company,proto3" json:"company,omitempty"`
|
|
Roles []*Role `protobuf:"bytes,6,rep,name=roles,proto3" json:"roles,omitempty"`
|
|
Reference string `protobuf:"bytes,7,opt,name=reference,proto3" json:"reference,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *User) Reset() { *m = User{} }
|
|
func (m *User) String() string { return proto.CompactTextString(m) }
|
|
func (*User) ProtoMessage() {}
|
|
func (*User) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_users_service_dc0ff1c6dd633c02, []int{5}
|
|
}
|
|
func (m *User) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_User.Unmarshal(m, b)
|
|
}
|
|
func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_User.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *User) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_User.Merge(dst, src)
|
|
}
|
|
func (m *User) XXX_Size() int {
|
|
return xxx_messageInfo_User.Size(m)
|
|
}
|
|
func (m *User) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_User.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_User proto.InternalMessageInfo
|
|
|
|
func (m *User) GetUserID() uint64 {
|
|
if m != nil {
|
|
return m.UserID
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *User) GetUserName() string {
|
|
if m != nil {
|
|
return m.UserName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *User) GetFirstName() string {
|
|
if m != nil {
|
|
return m.FirstName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *User) GetLastName() string {
|
|
if m != nil {
|
|
return m.LastName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *User) GetCompany() *Company {
|
|
if m != nil {
|
|
return m.Company
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *User) GetRoles() []*Role {
|
|
if m != nil {
|
|
return m.Roles
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *User) GetReference() string {
|
|
if m != nil {
|
|
return m.Reference
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type Company struct {
|
|
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
|
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Company) Reset() { *m = Company{} }
|
|
func (m *Company) String() string { return proto.CompactTextString(m) }
|
|
func (*Company) ProtoMessage() {}
|
|
func (*Company) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_users_service_dc0ff1c6dd633c02, []int{6}
|
|
}
|
|
func (m *Company) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_Company.Unmarshal(m, b)
|
|
}
|
|
func (m *Company) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_Company.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *Company) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Company.Merge(dst, src)
|
|
}
|
|
func (m *Company) XXX_Size() int {
|
|
return xxx_messageInfo_Company.Size(m)
|
|
}
|
|
func (m *Company) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Company.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Company proto.InternalMessageInfo
|
|
|
|
func (m *Company) GetId() int64 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Company) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Company) GetCode() string {
|
|
if m != nil {
|
|
return m.Code
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type Role struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Rights []string `protobuf:"bytes,2,rep,name=rights,proto3" json:"rights,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Role) Reset() { *m = Role{} }
|
|
func (m *Role) String() string { return proto.CompactTextString(m) }
|
|
func (*Role) ProtoMessage() {}
|
|
func (*Role) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_users_service_dc0ff1c6dd633c02, []int{7}
|
|
}
|
|
func (m *Role) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_Role.Unmarshal(m, b)
|
|
}
|
|
func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_Role.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *Role) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Role.Merge(dst, src)
|
|
}
|
|
func (m *Role) XXX_Size() int {
|
|
return xxx_messageInfo_Role.Size(m)
|
|
}
|
|
func (m *Role) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Role.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Role proto.InternalMessageInfo
|
|
|
|
func (m *Role) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Role) GetRights() []string {
|
|
if m != nil {
|
|
return m.Rights
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type UsersFilter struct {
|
|
Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *UsersFilter) Reset() { *m = UsersFilter{} }
|
|
func (m *UsersFilter) String() string { return proto.CompactTextString(m) }
|
|
func (*UsersFilter) ProtoMessage() {}
|
|
func (*UsersFilter) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_users_service_dc0ff1c6dd633c02, []int{8}
|
|
}
|
|
func (m *UsersFilter) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_UsersFilter.Unmarshal(m, b)
|
|
}
|
|
func (m *UsersFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_UsersFilter.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *UsersFilter) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_UsersFilter.Merge(dst, src)
|
|
}
|
|
func (m *UsersFilter) XXX_Size() int {
|
|
return xxx_messageInfo_UsersFilter.Size(m)
|
|
}
|
|
func (m *UsersFilter) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_UsersFilter.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_UsersFilter proto.InternalMessageInfo
|
|
|
|
func (m *UsersFilter) GetReference() string {
|
|
if m != nil {
|
|
return m.Reference
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*GetUserByIDRequest)(nil), "usersservice.GetUserByIDRequest")
|
|
proto.RegisterType((*GetUserByIDResponse)(nil), "usersservice.GetUserByIDResponse")
|
|
proto.RegisterType((*ListUsersRequest)(nil), "usersservice.ListUsersRequest")
|
|
proto.RegisterType((*ListUsersResponse)(nil), "usersservice.ListUsersResponse")
|
|
proto.RegisterType((*Empty)(nil), "usersservice.Empty")
|
|
proto.RegisterType((*User)(nil), "usersservice.User")
|
|
proto.RegisterType((*Company)(nil), "usersservice.Company")
|
|
proto.RegisterType((*Role)(nil), "usersservice.Role")
|
|
proto.RegisterType((*UsersFilter)(nil), "usersservice.UsersFilter")
|
|
proto.RegisterEnum("usersservice.ListUsersRequest_SortCol", ListUsersRequest_SortCol_name, ListUsersRequest_SortCol_value)
|
|
}
|
|
|
|
// 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
|
|
|
|
// UserServiceClient is the client API for UserService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type UserServiceClient interface {
|
|
GetUserByID(ctx context.Context, in *GetUserByIDRequest, opts ...grpc.CallOption) (*GetUserByIDResponse, error)
|
|
ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error)
|
|
}
|
|
|
|
type userServiceClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient {
|
|
return &userServiceClient{cc}
|
|
}
|
|
|
|
func (c *userServiceClient) GetUserByID(ctx context.Context, in *GetUserByIDRequest, opts ...grpc.CallOption) (*GetUserByIDResponse, error) {
|
|
out := new(GetUserByIDResponse)
|
|
err := c.cc.Invoke(ctx, "/usersservice.UserService/GetUserByID", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) {
|
|
out := new(ListUsersResponse)
|
|
err := c.cc.Invoke(ctx, "/usersservice.UserService/ListUsers", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// UserServiceServer is the server API for UserService service.
|
|
type UserServiceServer interface {
|
|
GetUserByID(context.Context, *GetUserByIDRequest) (*GetUserByIDResponse, error)
|
|
ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
|
|
}
|
|
|
|
func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer) {
|
|
s.RegisterService(&_UserService_serviceDesc, srv)
|
|
}
|
|
|
|
func _UserService_GetUserByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetUserByIDRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).GetUserByID(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/usersservice.UserService/GetUserByID",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).GetUserByID(ctx, req.(*GetUserByIDRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_ListUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListUsersRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).ListUsers(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/usersservice.UserService/ListUsers",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).ListUsers(ctx, req.(*ListUsersRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _UserService_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "usersservice.UserService",
|
|
HandlerType: (*UserServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetUserByID",
|
|
Handler: _UserService_GetUserByID_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListUsers",
|
|
Handler: _UserService_ListUsers_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "users_service.proto",
|
|
}
|
|
|
|
func init() { proto.RegisterFile("users_service.proto", fileDescriptor_users_service_dc0ff1c6dd633c02) }
|
|
|
|
var fileDescriptor_users_service_dc0ff1c6dd633c02 = []byte{
|
|
// 516 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0x5d, 0x6f, 0x12, 0x41,
|
|
0x14, 0x75, 0xd9, 0x65, 0xb7, 0x5c, 0x6a, 0x83, 0xb7, 0xda, 0x6c, 0x89, 0x51, 0x9c, 0x87, 0x86,
|
|
0x44, 0x83, 0x11, 0xdf, 0x4c, 0x8c, 0xa1, 0x80, 0x86, 0xa4, 0x36, 0x66, 0x88, 0x2f, 0xbe, 0x10,
|
|
0x5c, 0x06, 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