Documentation ¶
Index ¶
- Variables
- func RegisterOpenweatherServer(s grpc.ServiceRegistrar, srv OpenweatherServer)
- type GetWeatherRequest
- func (*GetWeatherRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetWeatherRequest) GetMinReadTime() *timestamppb.Timestamp
- func (x *GetWeatherRequest) GetQuery() string
- func (*GetWeatherRequest) ProtoMessage()
- func (x *GetWeatherRequest) ProtoReflect() protoreflect.Message
- func (x *GetWeatherRequest) Reset()
- func (x *GetWeatherRequest) String() string
- type OpenweatherClient
- type OpenweatherServer
- type UnimplementedOpenweatherServer
- type UnsafeOpenweatherServer
- type Weather
- func (*Weather) Descriptor() ([]byte, []int)deprecated
- func (x *Weather) GetLocation() *location.Location
- func (x *Weather) GetReadTime() *timestamppb.Timestamp
- func (x *Weather) GetTemp() float64
- func (x *Weather) GetWindSpeed() float64
- func (*Weather) ProtoMessage()
- func (x *Weather) ProtoReflect() protoreflect.Message
- func (x *Weather) Reset()
- func (x *Weather) String() string
Constants ¶
This section is empty.
Variables ¶
var File_openweather_openweatherv1_proto protoreflect.FileDescriptor
var Openweather_ServiceDesc = grpc.ServiceDesc{ ServiceName: "weather.openweather.v1.Openweather", HandlerType: (*OpenweatherServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetWeather", Handler: _Openweather_GetWeather_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "openweather/openweatherv1.proto", }
Openweather_ServiceDesc is the grpc.ServiceDesc for Openweather service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOpenweatherServer ¶
func RegisterOpenweatherServer(s grpc.ServiceRegistrar, srv OpenweatherServer)
Types ¶
type GetWeatherRequest ¶
type GetWeatherRequest struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` MinReadTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=min_read_time,json=minReadTime,proto3" json:"min_read_time,omitempty"` // contains filtered or unexported fields }
func (*GetWeatherRequest) Descriptor
deprecated
func (*GetWeatherRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetWeatherRequest.ProtoReflect.Descriptor instead.
func (*GetWeatherRequest) GetMinReadTime ¶
func (x *GetWeatherRequest) GetMinReadTime() *timestamppb.Timestamp
func (*GetWeatherRequest) GetQuery ¶
func (x *GetWeatherRequest) GetQuery() string
func (*GetWeatherRequest) ProtoMessage ¶
func (*GetWeatherRequest) ProtoMessage()
func (*GetWeatherRequest) ProtoReflect ¶
func (x *GetWeatherRequest) ProtoReflect() protoreflect.Message
func (*GetWeatherRequest) Reset ¶
func (x *GetWeatherRequest) Reset()
func (*GetWeatherRequest) String ¶
func (x *GetWeatherRequest) String() string
type OpenweatherClient ¶
type OpenweatherClient interface {
GetWeather(ctx context.Context, in *GetWeatherRequest, opts ...grpc.CallOption) (*Weather, error)
}
OpenweatherClient is the client API for Openweather 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 NewOpenweatherClient ¶
func NewOpenweatherClient(cc grpc.ClientConnInterface) OpenweatherClient
type OpenweatherServer ¶
type OpenweatherServer interface { GetWeather(context.Context, *GetWeatherRequest) (*Weather, error) // contains filtered or unexported methods }
OpenweatherServer is the server API for Openweather service. All implementations must embed UnimplementedOpenweatherServer for forward compatibility
type UnimplementedOpenweatherServer ¶
type UnimplementedOpenweatherServer struct { }
UnimplementedOpenweatherServer must be embedded to have forward compatible implementations.
func (UnimplementedOpenweatherServer) GetWeather ¶
func (UnimplementedOpenweatherServer) GetWeather(context.Context, *GetWeatherRequest) (*Weather, error)
type UnsafeOpenweatherServer ¶
type UnsafeOpenweatherServer interface {
// contains filtered or unexported methods
}
UnsafeOpenweatherServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OpenweatherServer will result in compilation errors.
type Weather ¶
type Weather struct { ReadTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"` Location *location.Location `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` Temp float64 `protobuf:"fixed64,3,opt,name=temp,proto3" json:"temp,omitempty"` // Wind speed in m/sec. WindSpeed float64 `protobuf:"fixed64,4,opt,name=wind_speed,json=windSpeed,proto3" json:"wind_speed,omitempty"` // contains filtered or unexported fields }
https://openweathermap.org/current
func (*Weather) Descriptor
deprecated
func (*Weather) GetLocation ¶
func (*Weather) GetReadTime ¶
func (x *Weather) GetReadTime() *timestamppb.Timestamp
func (*Weather) GetWindSpeed ¶
func (*Weather) ProtoMessage ¶
func (*Weather) ProtoMessage()
func (*Weather) ProtoReflect ¶
func (x *Weather) ProtoReflect() protoreflect.Message