api

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 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 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) Descriptor() ([]byte, []int)

func (*Empty) ProtoMessage added in v1.3.0

func (*Empty) ProtoMessage()

func (*Empty) Reset added in v1.3.0

func (m *Empty) Reset()

func (*Empty) String added in v1.3.0

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown added in v1.3.0

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal added in v1.3.0

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

func (*Empty) XXX_Merge added in v1.3.0

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

func (*Empty) XXX_Size added in v1.3.0

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal added in v1.3.0

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 added in v1.3.0

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

func (*UidT) GetUid added in v1.3.0

func (m *UidT) GetUid() int64

func (*UidT) ProtoMessage added in v1.3.0

func (*UidT) ProtoMessage()

func (*UidT) Reset added in v1.3.0

func (m *UidT) Reset()

func (*UidT) String added in v1.3.0

func (m *UidT) String() string

func (*UidT) XXX_DiscardUnknown added in v1.3.0

func (m *UidT) XXX_DiscardUnknown()

func (*UidT) XXX_Marshal added in v1.3.0

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

func (*UidT) XXX_Merge added in v1.3.0

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

func (*UidT) XXX_Size added in v1.3.0

func (m *UidT) XXX_Size() int

func (*UidT) XXX_Unmarshal added in v1.3.0

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 added in v1.3.0

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

func (*UnimplementedUserServer) DeleteUser added in v1.3.0

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

func (*UnimplementedUserServer) Ping

func (*UnimplementedUserServer) ReadUser added in v1.3.0

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

func (*UnimplementedUserServer) UpdateUser added in v1.3.0

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

func (*UserT) GetName added in v1.3.0

func (m *UserT) GetName() string

func (*UserT) GetSex added in v1.3.0

func (m *UserT) GetSex() int64

func (*UserT) GetUid added in v1.3.0

func (m *UserT) GetUid() int64

func (*UserT) ProtoMessage added in v1.3.0

func (*UserT) ProtoMessage()

func (*UserT) Reset added in v1.3.0

func (m *UserT) Reset()

func (*UserT) String added in v1.3.0

func (m *UserT) String() string

func (*UserT) XXX_DiscardUnknown added in v1.3.0

func (m *UserT) XXX_DiscardUnknown()

func (*UserT) XXX_Marshal added in v1.3.0

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

func (*UserT) XXX_Merge added in v1.3.0

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

func (*UserT) XXX_Size added in v1.3.0

func (m *UserT) XXX_Size() int

func (*UserT) XXX_Unmarshal added in v1.3.0

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