date

package
v0.0.119 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DateService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sea.api.date.DateService",
	HandlerType: (*DateServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Now",
			Handler:    _DateService_Now_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "go/net/grpc/example/data.proto",
}

DateService_ServiceDesc is the grpc.ServiceDesc for DateService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_go_net_grpc_example_data_proto protoreflect.FileDescriptor

Functions

func RegisterDateServiceServer

func RegisterDateServiceServer(s grpc.ServiceRegistrar, srv DateServiceServer)

Types

type DateServiceClient

type DateServiceClient interface {
	// 生成当前时间
	Now(ctx context.Context, in *NowRequest, opts ...grpc.CallOption) (*NowResponse, error)
}

DateServiceClient is the client API for DateService 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.

type DateServiceServer

type DateServiceServer interface {
	// 生成当前时间
	Now(context.Context, *NowRequest) (*NowResponse, error)
	// contains filtered or unexported methods
}

DateServiceServer is the server API for DateService service. All implementations must embed UnimplementedDateServiceServer for forward compatibility

type NowRequest

type NowRequest struct {
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=RequestId,proto3" json:"request_id,omitempty"` //请求ID
	// contains filtered or unexported fields
}

func (*NowRequest) Descriptor deprecated

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

Deprecated: Use NowRequest.ProtoReflect.Descriptor instead.

func (*NowRequest) GetRequestId

func (x *NowRequest) GetRequestId() string

func (*NowRequest) ProtoMessage

func (*NowRequest) ProtoMessage()

func (*NowRequest) ProtoReflect

func (x *NowRequest) ProtoReflect() protoreflect.Message

func (*NowRequest) Reset

func (x *NowRequest) Reset()

func (*NowRequest) String

func (x *NowRequest) String() string

type NowResponse

type NowResponse struct {
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=RequestId,proto3" json:"request_id,omitempty"` // 请求ID
	Date      string `protobuf:"bytes,2,opt,name=date,json=Date,proto3" json:"date,omitempty"`                  //当前时间
	// contains filtered or unexported fields
}

func (*NowResponse) Descriptor deprecated

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

Deprecated: Use NowResponse.ProtoReflect.Descriptor instead.

func (*NowResponse) GetDate

func (x *NowResponse) GetDate() string

func (*NowResponse) GetRequestId

func (x *NowResponse) GetRequestId() string

func (*NowResponse) ProtoMessage

func (*NowResponse) ProtoMessage()

func (*NowResponse) ProtoReflect

func (x *NowResponse) ProtoReflect() protoreflect.Message

func (*NowResponse) Reset

func (x *NowResponse) Reset()

func (*NowResponse) String

func (x *NowResponse) String() string

type Repository

type Repository struct {
	grpc_.Repository[DateServiceClient]
}

func (*Repository) Now

func (r *Repository) Now(ctx context.Context, req *NowRequest) (resp *NowResponse, err error)

type UnimplementedDateServiceServer

type UnimplementedDateServiceServer struct {
}

UnimplementedDateServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDateServiceServer) Now

type UnsafeDateServiceServer

type UnsafeDateServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeDateServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DateServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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