Documentation
¶
Index ¶
- Variables
- func RegisterWeatherstackServer(s grpc.ServiceRegistrar, srv WeatherstackServer)
- type CurrentWeather
- func (*CurrentWeather) Descriptor() ([]byte, []int)deprecated
- func (x *CurrentWeather) GetLocation() *location.Location
- func (x *CurrentWeather) GetReadTime() *timestamppb.Timestamp
- func (x *CurrentWeather) GetTemperature() float64
- func (x *CurrentWeather) GetWindSpeed() float64
- func (*CurrentWeather) ProtoMessage()
- func (x *CurrentWeather) ProtoReflect() protoreflect.Message
- func (x *CurrentWeather) Reset()
- func (x *CurrentWeather) String() string
- type GetCurrentWeatherRequest
- func (*GetCurrentWeatherRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetCurrentWeatherRequest) GetMinReadTime() *timestamppb.Timestamp
- func (x *GetCurrentWeatherRequest) GetQuery() string
- func (*GetCurrentWeatherRequest) ProtoMessage()
- func (x *GetCurrentWeatherRequest) ProtoReflect() protoreflect.Message
- func (x *GetCurrentWeatherRequest) Reset()
- func (x *GetCurrentWeatherRequest) String() string
- type UnimplementedWeatherstackServer
- type UnsafeWeatherstackServer
- type WeatherstackClient
- type WeatherstackServer
Constants ¶
This section is empty.
Variables ¶
var File_weatherstack_weatherstackv1_proto protoreflect.FileDescriptor
var Weatherstack_ServiceDesc = grpc.ServiceDesc{ ServiceName: "weather.weatherstack.v1.Weatherstack", HandlerType: (*WeatherstackServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetCurrentWeather", Handler: _Weatherstack_GetCurrentWeather_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "weatherstack/weatherstackv1.proto", }
Weatherstack_ServiceDesc is the grpc.ServiceDesc for Weatherstack service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterWeatherstackServer ¶
func RegisterWeatherstackServer(s grpc.ServiceRegistrar, srv WeatherstackServer)
Types ¶
type CurrentWeather ¶
type CurrentWeather 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"` Temperature float64 `protobuf:"fixed64,3,opt,name=temperature,proto3" json:"temperature,omitempty"` // Wind speed in km/hour. WindSpeed float64 `protobuf:"fixed64,4,opt,name=wind_speed,json=windSpeed,proto3" json:"wind_speed,omitempty"` // contains filtered or unexported fields }
https://weatherstack.com/documentation#current_weather
func (*CurrentWeather) Descriptor
deprecated
func (*CurrentWeather) Descriptor() ([]byte, []int)
Deprecated: Use CurrentWeather.ProtoReflect.Descriptor instead.
func (*CurrentWeather) GetLocation ¶
func (x *CurrentWeather) GetLocation() *location.Location
func (*CurrentWeather) GetReadTime ¶
func (x *CurrentWeather) GetReadTime() *timestamppb.Timestamp
func (*CurrentWeather) GetTemperature ¶
func (x *CurrentWeather) GetTemperature() float64
func (*CurrentWeather) GetWindSpeed ¶
func (x *CurrentWeather) GetWindSpeed() float64
func (*CurrentWeather) ProtoMessage ¶
func (*CurrentWeather) ProtoMessage()
func (*CurrentWeather) ProtoReflect ¶
func (x *CurrentWeather) ProtoReflect() protoreflect.Message
func (*CurrentWeather) Reset ¶
func (x *CurrentWeather) Reset()
func (*CurrentWeather) String ¶
func (x *CurrentWeather) String() string
type GetCurrentWeatherRequest ¶
type GetCurrentWeatherRequest 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 (*GetCurrentWeatherRequest) Descriptor
deprecated
func (*GetCurrentWeatherRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetCurrentWeatherRequest.ProtoReflect.Descriptor instead.
func (*GetCurrentWeatherRequest) GetMinReadTime ¶
func (x *GetCurrentWeatherRequest) GetMinReadTime() *timestamppb.Timestamp
func (*GetCurrentWeatherRequest) GetQuery ¶
func (x *GetCurrentWeatherRequest) GetQuery() string
func (*GetCurrentWeatherRequest) ProtoMessage ¶
func (*GetCurrentWeatherRequest) ProtoMessage()
func (*GetCurrentWeatherRequest) ProtoReflect ¶
func (x *GetCurrentWeatherRequest) ProtoReflect() protoreflect.Message
func (*GetCurrentWeatherRequest) Reset ¶
func (x *GetCurrentWeatherRequest) Reset()
func (*GetCurrentWeatherRequest) String ¶
func (x *GetCurrentWeatherRequest) String() string
type UnimplementedWeatherstackServer ¶
type UnimplementedWeatherstackServer struct { }
UnimplementedWeatherstackServer must be embedded to have forward compatible implementations.
func (UnimplementedWeatherstackServer) GetCurrentWeather ¶
func (UnimplementedWeatherstackServer) GetCurrentWeather(context.Context, *GetCurrentWeatherRequest) (*CurrentWeather, error)
type UnsafeWeatherstackServer ¶
type UnsafeWeatherstackServer interface {
// contains filtered or unexported methods
}
UnsafeWeatherstackServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WeatherstackServer will result in compilation errors.
type WeatherstackClient ¶
type WeatherstackClient interface {
GetCurrentWeather(ctx context.Context, in *GetCurrentWeatherRequest, opts ...grpc.CallOption) (*CurrentWeather, error)
}
WeatherstackClient is the client API for Weatherstack 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 NewWeatherstackClient ¶
func NewWeatherstackClient(cc grpc.ClientConnInterface) WeatherstackClient
type WeatherstackServer ¶
type WeatherstackServer interface { GetCurrentWeather(context.Context, *GetCurrentWeatherRequest) (*CurrentWeather, error) // contains filtered or unexported methods }
WeatherstackServer is the server API for Weatherstack service. All implementations must embed UnimplementedWeatherstackServer for forward compatibility