Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_api_api_proto protoreflect.FileDescriptor
var Time_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.Time", HandlerType: (*TimeServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetTime", Handler: _Time_GetTime_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/api.proto", }
Time_ServiceDesc is the grpc.ServiceDesc for Time service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTimeServer ¶
func RegisterTimeServer(s grpc.ServiceRegistrar, srv TimeServer)
Types ¶
type TimeClient ¶
type TimeClient interface {
GetTime(ctx context.Context, in *TimeRequest, opts ...grpc.CallOption) (*TimeResponse, error)
}
TimeClient is the client API for Time 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 NewTimeClient ¶
func NewTimeClient(cc grpc.ClientConnInterface) TimeClient
type TimeRequest ¶
type TimeRequest struct { Timezone string `protobuf:"bytes,1,opt,name=timezone,proto3" json:"timezone,omitempty"` // contains filtered or unexported fields }
func (*TimeRequest) Descriptor
deprecated
func (*TimeRequest) Descriptor() ([]byte, []int)
Deprecated: Use TimeRequest.ProtoReflect.Descriptor instead.
func (*TimeRequest) GetTimezone ¶
func (x *TimeRequest) GetTimezone() string
func (*TimeRequest) ProtoMessage ¶
func (*TimeRequest) ProtoMessage()
func (*TimeRequest) ProtoReflect ¶
func (x *TimeRequest) ProtoReflect() protoreflect.Message
func (*TimeRequest) Reset ¶
func (x *TimeRequest) Reset()
func (*TimeRequest) String ¶
func (x *TimeRequest) String() string
type TimeResponse ¶
type TimeResponse struct { Time string `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` // contains filtered or unexported fields }
func (*TimeResponse) Descriptor
deprecated
func (*TimeResponse) Descriptor() ([]byte, []int)
Deprecated: Use TimeResponse.ProtoReflect.Descriptor instead.
func (*TimeResponse) GetTime ¶
func (x *TimeResponse) GetTime() string
func (*TimeResponse) ProtoMessage ¶
func (*TimeResponse) ProtoMessage()
func (*TimeResponse) ProtoReflect ¶
func (x *TimeResponse) ProtoReflect() protoreflect.Message
func (*TimeResponse) Reset ¶
func (x *TimeResponse) Reset()
func (*TimeResponse) String ¶
func (x *TimeResponse) String() string
type TimeServer ¶
type TimeServer interface { GetTime(context.Context, *TimeRequest) (*TimeResponse, error) // contains filtered or unexported methods }
TimeServer is the server API for Time service. All implementations must embed UnimplementedTimeServer for forward compatibility
type UnimplementedTimeServer ¶
type UnimplementedTimeServer struct { }
UnimplementedTimeServer must be embedded to have forward compatible implementations.
func (UnimplementedTimeServer) GetTime ¶
func (UnimplementedTimeServer) GetTime(context.Context, *TimeRequest) (*TimeResponse, error)
type UnsafeTimeServer ¶
type UnsafeTimeServer interface {
// contains filtered or unexported methods
}
UnsafeTimeServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TimeServer will result in compilation errors.