Files
services/weather/proto/weather.pb.go
2021-06-21 14:45:53 +01:00

420 lines
14 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.15.6
// source: proto/weather.proto
package weather
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Get the current weather report for a location by postcode, city, zip code, ip address
type NowRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// location to get weather e.g postcode, city
Location string `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
}
func (x *NowRequest) Reset() {
*x = NowRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_weather_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NowRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NowRequest) ProtoMessage() {}
func (x *NowRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_weather_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NowRequest.ProtoReflect.Descriptor instead.
func (*NowRequest) Descriptor() ([]byte, []int) {
return file_proto_weather_proto_rawDescGZIP(), []int{0}
}
func (x *NowRequest) GetLocation() string {
if x != nil {
return x.Location
}
return ""
}
type NowResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// location of the request
Location string `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
// region related to the location
Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"`
// country of the request
Country string `protobuf:"bytes,3,opt,name=country,proto3" json:"country,omitempty"`
// e.g 37.55
Latitude float64 `protobuf:"fixed64,4,opt,name=latitude,proto3" json:"latitude,omitempty"`
// e.g -77.46
Longitude float64 `protobuf:"fixed64,5,opt,name=longitude,proto3" json:"longitude,omitempty"`
// timezone of the location
Timezone string `protobuf:"bytes,6,opt,name=timezone,proto3" json:"timezone,omitempty"`
// the local time
LocalTime string `protobuf:"bytes,7,opt,name=local_time,json=localTime,proto3" json:"local_time,omitempty"`
// temperature in celsius
TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,proto3" json:"temp_c,omitempty"`
// temperature in fahrenheit
TempF float64 `protobuf:"fixed64,9,opt,name=temp_f,json=tempF,proto3" json:"temp_f,omitempty"`
// feels like in celsius
FeelsLikeC float64 `protobuf:"fixed64,10,opt,name=feels_like_c,json=feelsLikeC,proto3" json:"feels_like_c,omitempty"`
// feels like in fahrenheit
FeelsLikeF float64 `protobuf:"fixed64,11,opt,name=feels_like_f,json=feelsLikeF,proto3" json:"feels_like_f,omitempty"`
// the humidity percentage
Humidity int32 `protobuf:"varint,12,opt,name=humidity,proto3" json:"humidity,omitempty"`
// cloud cover percentage
Cloud int32 `protobuf:"varint,13,opt,name=cloud,proto3" json:"cloud,omitempty"`
// whether its daytime
Daytime bool `protobuf:"varint,14,opt,name=daytime,proto3" json:"daytime,omitempty"`
// the weather condition
Condition string `protobuf:"bytes,15,opt,name=condition,proto3" json:"condition,omitempty"`
// the related icon
IconUrl string `protobuf:"bytes,16,opt,name=icon_url,json=iconUrl,proto3" json:"icon_url,omitempty"`
// wind in mph
WindMph float64 `protobuf:"fixed64,17,opt,name=wind_mph,json=windMph,proto3" json:"wind_mph,omitempty"`
// wind in kph
WindKph float64 `protobuf:"fixed64,18,opt,name=wind_kph,json=windKph,proto3" json:"wind_kph,omitempty"`
// wind direction
WindDirection string `protobuf:"bytes,19,opt,name=wind_direction,json=windDirection,proto3" json:"wind_direction,omitempty"`
// wind degree
WindDegree int32 `protobuf:"varint,20,opt,name=wind_degree,json=windDegree,proto3" json:"wind_degree,omitempty"`
}
func (x *NowResponse) Reset() {
*x = NowResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_weather_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NowResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NowResponse) ProtoMessage() {}
func (x *NowResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_weather_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NowResponse.ProtoReflect.Descriptor instead.
func (*NowResponse) Descriptor() ([]byte, []int) {
return file_proto_weather_proto_rawDescGZIP(), []int{1}
}
func (x *NowResponse) GetLocation() string {
if x != nil {
return x.Location
}
return ""
}
func (x *NowResponse) GetRegion() string {
if x != nil {
return x.Region
}
return ""
}
func (x *NowResponse) GetCountry() string {
if x != nil {
return x.Country
}
return ""
}
func (x *NowResponse) GetLatitude() float64 {
if x != nil {
return x.Latitude
}
return 0
}
func (x *NowResponse) GetLongitude() float64 {
if x != nil {
return x.Longitude
}
return 0
}
func (x *NowResponse) GetTimezone() string {
if x != nil {
return x.Timezone
}
return ""
}
func (x *NowResponse) GetLocalTime() string {
if x != nil {
return x.LocalTime
}
return ""
}
func (x *NowResponse) GetTempC() float64 {
if x != nil {
return x.TempC
}
return 0
}
func (x *NowResponse) GetTempF() float64 {
if x != nil {
return x.TempF
}
return 0
}
func (x *NowResponse) GetFeelsLikeC() float64 {
if x != nil {
return x.FeelsLikeC
}
return 0
}
func (x *NowResponse) GetFeelsLikeF() float64 {
if x != nil {
return x.FeelsLikeF
}
return 0
}
func (x *NowResponse) GetHumidity() int32 {
if x != nil {
return x.Humidity
}
return 0
}
func (x *NowResponse) GetCloud() int32 {
if x != nil {
return x.Cloud
}
return 0
}
func (x *NowResponse) GetDaytime() bool {
if x != nil {
return x.Daytime
}
return false
}
func (x *NowResponse) GetCondition() string {
if x != nil {
return x.Condition
}
return ""
}
func (x *NowResponse) GetIconUrl() string {
if x != nil {
return x.IconUrl
}
return ""
}
func (x *NowResponse) GetWindMph() float64 {
if x != nil {
return x.WindMph
}
return 0
}
func (x *NowResponse) GetWindKph() float64 {
if x != nil {
return x.WindKph
}
return 0
}
func (x *NowResponse) GetWindDirection() string {
if x != nil {
return x.WindDirection
}
return ""
}
func (x *NowResponse) GetWindDegree() int32 {
if x != nil {
return x.WindDegree
}
return 0
}
var File_proto_weather_proto protoreflect.FileDescriptor
var file_proto_weather_proto_rawDesc = []byte{
0x0a, 0x13, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x77, 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x77, 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, 0x22, 0x28,
0x0a, 0x0a, 0x4e, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08,
0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc5, 0x04, 0x0a, 0x0b, 0x4e, 0x6f, 0x77,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75,
0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75,
0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18,
0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x1d, 0x0a, 0x0a,
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x74,
0x65, 0x6d, 0x70, 0x5f, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x74, 0x65, 0x6d,
0x70, 0x43, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x66, 0x18, 0x09, 0x20, 0x01,
0x28, 0x01, 0x52, 0x05, 0x74, 0x65, 0x6d, 0x70, 0x46, 0x12, 0x20, 0x0a, 0x0c, 0x66, 0x65, 0x65,
0x6c, 0x73, 0x5f, 0x6c, 0x69, 0x6b, 0x65, 0x5f, 0x63, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52,
0x0a, 0x66, 0x65, 0x65, 0x6c, 0x73, 0x4c, 0x69, 0x6b, 0x65, 0x43, 0x12, 0x20, 0x0a, 0x0c, 0x66,
0x65, 0x65, 0x6c, 0x73, 0x5f, 0x6c, 0x69, 0x6b, 0x65, 0x5f, 0x66, 0x18, 0x0b, 0x20, 0x01, 0x28,
0x01, 0x52, 0x0a, 0x66, 0x65, 0x65, 0x6c, 0x73, 0x4c, 0x69, 0x6b, 0x65, 0x46, 0x12, 0x1a, 0x0a,
0x08, 0x68, 0x75, 0x6d, 0x69, 0x64, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x68, 0x75, 0x6d, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f,
0x75, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x12,
0x18, 0x0a, 0x07, 0x64, 0x61, 0x79, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08,
0x52, 0x07, 0x64, 0x61, 0x79, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e,
0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f,
0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x63, 0x6f, 0x6e, 0x5f,
0x75, 0x72, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x63, 0x6f, 0x6e, 0x55,
0x72, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x64, 0x5f, 0x6d, 0x70, 0x68, 0x18, 0x11,
0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x64, 0x4d, 0x70, 0x68, 0x12, 0x19, 0x0a,
0x08, 0x77, 0x69, 0x6e, 0x64, 0x5f, 0x6b, 0x70, 0x68, 0x18, 0x12, 0x20, 0x01, 0x28, 0x01, 0x52,
0x07, 0x77, 0x69, 0x6e, 0x64, 0x4b, 0x70, 0x68, 0x12, 0x25, 0x0a, 0x0e, 0x77, 0x69, 0x6e, 0x64,
0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0d, 0x77, 0x69, 0x6e, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x1f, 0x0a, 0x0b, 0x77, 0x69, 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x67, 0x72, 0x65, 0x65, 0x18, 0x14,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x44, 0x65, 0x67, 0x72, 0x65, 0x65,
0x32, 0x3d, 0x0a, 0x07, 0x57, 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x03, 0x4e,
0x6f, 0x77, 0x12, 0x13, 0x2e, 0x77, 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x77,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x77, 0x65, 0x61, 0x74, 0x68, 0x65,
0x72, 0x2e, 0x4e, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
0x11, 0x5a, 0x0f, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x77, 0x65, 0x61, 0x74, 0x68,
0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_proto_weather_proto_rawDescOnce sync.Once
file_proto_weather_proto_rawDescData = file_proto_weather_proto_rawDesc
)
func file_proto_weather_proto_rawDescGZIP() []byte {
file_proto_weather_proto_rawDescOnce.Do(func() {
file_proto_weather_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_weather_proto_rawDescData)
})
return file_proto_weather_proto_rawDescData
}
var file_proto_weather_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_proto_weather_proto_goTypes = []interface{}{
(*NowRequest)(nil), // 0: weather.NowRequest
(*NowResponse)(nil), // 1: weather.NowResponse
}
var file_proto_weather_proto_depIdxs = []int32{
0, // 0: weather.Weather.Now:input_type -> weather.NowRequest
1, // 1: weather.Weather.Now:output_type -> weather.NowResponse
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_proto_weather_proto_init() }
func file_proto_weather_proto_init() {
if File_proto_weather_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_proto_weather_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NowRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_weather_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NowResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_proto_weather_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_proto_weather_proto_goTypes,
DependencyIndexes: file_proto_weather_proto_depIdxs,
MessageInfos: file_proto_weather_proto_msgTypes,
}.Build()
File_proto_weather_proto = out.File
file_proto_weather_proto_rawDesc = nil
file_proto_weather_proto_goTypes = nil
file_proto_weather_proto_depIdxs = nil
}