Documentation ¶
Index ¶
- func RegisterUserServer(s *grpc.Server, srv UserServer)
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type Reply
- func (*Reply) Descriptor() ([]byte, []int)
- func (m *Reply) GetCount() int64
- func (m *Reply) GetMessage() string
- func (*Reply) ProtoMessage()
- func (m *Reply) Reset()
- func (m *Reply) String() string
- func (m *Reply) XXX_DiscardUnknown()
- func (m *Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Reply) XXX_Merge(src proto.Message)
- func (m *Reply) XXX_Size() int
- func (m *Reply) XXX_Unmarshal(b []byte) error
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetMessage() string
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- func (m *Request) XXX_DiscardUnknown()
- func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Request) XXX_Merge(src proto.Message)
- func (m *Request) XXX_Size() int
- func (m *Request) XXX_Unmarshal(b []byte) error
- type UidT
- func (*UidT) Descriptor() ([]byte, []int)
- func (m *UidT) GetUid() int64
- func (*UidT) ProtoMessage()
- func (m *UidT) Reset()
- func (m *UidT) String() string
- func (m *UidT) XXX_DiscardUnknown()
- func (m *UidT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UidT) XXX_Merge(src proto.Message)
- func (m *UidT) XXX_Size() int
- func (m *UidT) XXX_Unmarshal(b []byte) error
- type UnimplementedUserServer
- func (*UnimplementedUserServer) CreateUser(ctx context.Context, req *UserT) (*UidT, error)
- func (*UnimplementedUserServer) DeleteUser(ctx context.Context, req *UidT) (*Empty, error)
- func (*UnimplementedUserServer) Ping(ctx context.Context, req *Request) (*Reply, error)
- func (*UnimplementedUserServer) ReadUser(ctx context.Context, req *UidT) (*UserT, error)
- func (*UnimplementedUserServer) UpdateUser(ctx context.Context, req *UserT) (*Empty, error)
- type UserClient
- type UserServer
- type UserT
- func (*UserT) Descriptor() ([]byte, []int)
- func (m *UserT) GetName() string
- func (m *UserT) GetSex() int64
- func (m *UserT) GetUid() int64
- func (*UserT) ProtoMessage()
- func (m *UserT) Reset()
- func (m *UserT) String() string
- func (m *UserT) XXX_DiscardUnknown()
- func (m *UserT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UserT) XXX_Merge(src proto.Message)
- func (m *UserT) XXX_Size() int
- func (m *UserT) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterUserServer ¶
func RegisterUserServer(s *grpc.Server, srv UserServer)
Types ¶
type Empty ¶ added in v1.3.0
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Empty) Descriptor ¶ added in v1.3.0
func (*Empty) ProtoMessage ¶ added in v1.3.0
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶ added in v1.3.0
func (*Empty) XXX_Unmarshal ¶ added in v1.3.0
type Reply ¶
type Reply struct { Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"` Count int64 `protobuf:"zigzag64,2,opt,name=Count,proto3" json:"Count,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Reply) Descriptor ¶
func (*Reply) GetMessage ¶
func (*Reply) ProtoMessage ¶
func (*Reply) ProtoMessage()
func (*Reply) XXX_DiscardUnknown ¶
func (m *Reply) XXX_DiscardUnknown()
func (*Reply) XXX_Marshal ¶
func (*Reply) XXX_Unmarshal ¶
type Request ¶
type Request struct { Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request) Descriptor ¶
func (*Request) GetMessage ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type UidT ¶ added in v1.3.0
type UidT struct { Uid int64 `protobuf:"zigzag64,1,opt,name=Uid,proto3" json:"Uid,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UidT) Descriptor ¶ added in v1.3.0
func (*UidT) ProtoMessage ¶ added in v1.3.0
func (*UidT) ProtoMessage()
func (*UidT) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *UidT) XXX_DiscardUnknown()
func (*UidT) XXX_Marshal ¶ added in v1.3.0
func (*UidT) XXX_Unmarshal ¶ added in v1.3.0
type UnimplementedUserServer ¶
type UnimplementedUserServer struct { }
UnimplementedUserServer can be embedded to have forward compatible implementations.
func (*UnimplementedUserServer) CreateUser ¶ added in v1.3.0
func (*UnimplementedUserServer) DeleteUser ¶ added in v1.3.0
func (*UnimplementedUserServer) UpdateUser ¶ added in v1.3.0
type UserClient ¶
type UserClient interface { Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error) CreateUser(ctx context.Context, in *UserT, opts ...grpc.CallOption) (*UidT, error) UpdateUser(ctx context.Context, in *UserT, opts ...grpc.CallOption) (*Empty, error) ReadUser(ctx context.Context, in *UidT, opts ...grpc.CallOption) (*UserT, error) DeleteUser(ctx context.Context, in *UidT, opts ...grpc.CallOption) (*Empty, error) }
UserClient is the client API for User service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUserClient ¶
func NewUserClient(cc *grpc.ClientConn) UserClient
type UserServer ¶
type UserServer interface { Ping(context.Context, *Request) (*Reply, error) CreateUser(context.Context, *UserT) (*UidT, error) UpdateUser(context.Context, *UserT) (*Empty, error) ReadUser(context.Context, *UidT) (*UserT, error) DeleteUser(context.Context, *UidT) (*Empty, error) }
UserServer is the server API for User service.
type UserT ¶ added in v1.3.0
type UserT struct { Uid int64 `protobuf:"zigzag64,1,opt,name=Uid,proto3" json:"Uid,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` Sex int64 `protobuf:"zigzag64,3,opt,name=Sex,proto3" json:"Sex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UserT) Descriptor ¶ added in v1.3.0
func (*UserT) ProtoMessage ¶ added in v1.3.0
func (*UserT) ProtoMessage()
func (*UserT) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *UserT) XXX_DiscardUnknown()
func (*UserT) XXX_Marshal ¶ added in v1.3.0
func (*UserT) XXX_Unmarshal ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.