Documentation
¶
Index ¶
- Variables
- func RegisterCampusServer(s grpc.ServiceRegistrar, srv CampusServer)
- type CampusClient
- type CampusServer
- type GetTopNewsReply
- func (*GetTopNewsReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetTopNewsReply) GetCreated() *timestamp.Timestamp
- func (x *GetTopNewsReply) GetFrom() *timestamp.Timestamp
- func (x *GetTopNewsReply) GetLink() string
- func (x *GetTopNewsReply) GetName() string
- func (x *GetTopNewsReply) GetTo() *timestamp.Timestamp
- func (*GetTopNewsReply) ProtoMessage()
- func (x *GetTopNewsReply) ProtoReflect() protoreflect.Message
- func (x *GetTopNewsReply) Reset()
- func (x *GetTopNewsReply) String() string
- type GetTopNewsRequest
- type UnimplementedCampusServer
- type UnsafeCampusServer
Constants ¶
This section is empty.
Variables ¶
var Campus_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.Campus", HandlerType: (*CampusServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetTopNews", Handler: _Campus_GetTopNews_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "CampusService.proto", }
Campus_ServiceDesc is the grpc.ServiceDesc for Campus service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_CampusService_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCampusServer ¶
func RegisterCampusServer(s grpc.ServiceRegistrar, srv CampusServer)
Types ¶
type CampusClient ¶
type CampusClient interface {
GetTopNews(ctx context.Context, in *GetTopNewsRequest, opts ...grpc.CallOption) (*GetTopNewsReply, error)
}
CampusClient is the client API for Campus service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewCampusClient ¶
func NewCampusClient(cc grpc.ClientConnInterface) CampusClient
type CampusServer ¶
type CampusServer interface { GetTopNews(context.Context, *GetTopNewsRequest) (*GetTopNewsReply, error) // contains filtered or unexported methods }
CampusServer is the server API for Campus service. All implementations must embed UnimplementedCampusServer for forward compatibility
type GetTopNewsReply ¶
type GetTopNewsReply struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Link string `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` Created *timestamp.Timestamp `protobuf:"bytes,3,opt,name=created,proto3" json:"created,omitempty"` From *timestamp.Timestamp `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"` To *timestamp.Timestamp `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"` // contains filtered or unexported fields }
func (*GetTopNewsReply) Descriptor
deprecated
func (*GetTopNewsReply) Descriptor() ([]byte, []int)
Deprecated: Use GetTopNewsReply.ProtoReflect.Descriptor instead.
func (*GetTopNewsReply) GetCreated ¶
func (x *GetTopNewsReply) GetCreated() *timestamp.Timestamp
func (*GetTopNewsReply) GetFrom ¶
func (x *GetTopNewsReply) GetFrom() *timestamp.Timestamp
func (*GetTopNewsReply) GetLink ¶
func (x *GetTopNewsReply) GetLink() string
func (*GetTopNewsReply) GetName ¶
func (x *GetTopNewsReply) GetName() string
func (*GetTopNewsReply) GetTo ¶
func (x *GetTopNewsReply) GetTo() *timestamp.Timestamp
func (*GetTopNewsReply) ProtoMessage ¶
func (*GetTopNewsReply) ProtoMessage()
func (*GetTopNewsReply) ProtoReflect ¶
func (x *GetTopNewsReply) ProtoReflect() protoreflect.Message
func (*GetTopNewsReply) Reset ¶
func (x *GetTopNewsReply) Reset()
func (*GetTopNewsReply) String ¶
func (x *GetTopNewsReply) String() string
type GetTopNewsRequest ¶
type GetTopNewsRequest struct {
// contains filtered or unexported fields
}
func (*GetTopNewsRequest) Descriptor
deprecated
func (*GetTopNewsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTopNewsRequest.ProtoReflect.Descriptor instead.
func (*GetTopNewsRequest) ProtoMessage ¶
func (*GetTopNewsRequest) ProtoMessage()
func (*GetTopNewsRequest) ProtoReflect ¶
func (x *GetTopNewsRequest) ProtoReflect() protoreflect.Message
func (*GetTopNewsRequest) Reset ¶
func (x *GetTopNewsRequest) Reset()
func (*GetTopNewsRequest) String ¶
func (x *GetTopNewsRequest) String() string
type UnimplementedCampusServer ¶
type UnimplementedCampusServer struct { }
UnimplementedCampusServer must be embedded to have forward compatible implementations.
func (UnimplementedCampusServer) GetTopNews ¶
func (UnimplementedCampusServer) GetTopNews(context.Context, *GetTopNewsRequest) (*GetTopNewsReply, error)
type UnsafeCampusServer ¶
type UnsafeCampusServer interface {
// contains filtered or unexported methods
}
UnsafeCampusServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CampusServer will result in compilation errors.