api

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUserServer

func RegisterUserServer(s *grpc.Server, srv UserServer)

Types

type Empty

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

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

func (*Empty) XXX_Merge

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

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Reply) GetCount

func (m *Reply) GetCount() int64

func (*Reply) GetMessage

func (m *Reply) GetMessage() string

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) Reset

func (m *Reply) Reset()

func (*Reply) String

func (m *Reply) String() string

func (*Reply) XXX_DiscardUnknown

func (m *Reply) XXX_DiscardUnknown()

func (*Reply) XXX_Marshal

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

func (*Reply) XXX_Merge

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

func (*Reply) XXX_Size

func (m *Reply) XXX_Size() int

func (*Reply) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Request) GetMessage

func (m *Request) GetMessage() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

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

func (*Request) XXX_Merge

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

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

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

type UidT

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

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

func (*UidT) GetUid

func (m *UidT) GetUid() int64

func (*UidT) ProtoMessage

func (*UidT) ProtoMessage()

func (*UidT) Reset

func (m *UidT) Reset()

func (*UidT) String

func (m *UidT) String() string

func (*UidT) XXX_DiscardUnknown

func (m *UidT) XXX_DiscardUnknown()

func (*UidT) XXX_Marshal

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

func (*UidT) XXX_Merge

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

func (*UidT) XXX_Size

func (m *UidT) XXX_Size() int

func (*UidT) XXX_Unmarshal

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

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer can be embedded to have forward compatible implementations.

func (*UnimplementedUserServer) CreateUser

func (*UnimplementedUserServer) CreateUser(ctx context.Context, req *UserT) (*UidT, error)

func (*UnimplementedUserServer) DeleteUser

func (*UnimplementedUserServer) DeleteUser(ctx context.Context, req *UidT) (*Empty, error)

func (*UnimplementedUserServer) Ping

func (*UnimplementedUserServer) ReadUser

func (*UnimplementedUserServer) ReadUser(ctx context.Context, req *UidT) (*UserT, error)

func (*UnimplementedUserServer) UpdateUser

func (*UnimplementedUserServer) UpdateUser(ctx context.Context, req *UserT) (*Empty, error)

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)
	ReadUser(ctx context.Context, in *UidT, opts ...grpc.CallOption) (*UserT, error)
	UpdateUser(ctx context.Context, in *UserT, opts ...grpc.CallOption) (*Empty, 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)
	ReadUser(context.Context, *UidT) (*UserT, error)
	UpdateUser(context.Context, *UserT) (*Empty, error)
	DeleteUser(context.Context, *UidT) (*Empty, error)
}

UserServer is the server API for User service.

type UserT

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

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

func (*UserT) GetName

func (m *UserT) GetName() string

func (*UserT) GetSex

func (m *UserT) GetSex() int64

func (*UserT) GetUid

func (m *UserT) GetUid() int64

func (*UserT) ProtoMessage

func (*UserT) ProtoMessage()

func (*UserT) Reset

func (m *UserT) Reset()

func (*UserT) String

func (m *UserT) String() string

func (*UserT) XXX_DiscardUnknown

func (m *UserT) XXX_DiscardUnknown()

func (*UserT) XXX_Marshal

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

func (*UserT) XXX_Merge

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

func (*UserT) XXX_Size

func (m *UserT) XXX_Size() int

func (*UserT) XXX_Unmarshal

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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