Documentation ¶
Index ¶
- Variables
- func BackendClient(envs config.Envs) *grpc.ClientConn
- func RegisterWeatherServer(s grpc.ServiceRegistrar, srv WeatherServer)
- type TemperatureRange
- func (*TemperatureRange) Descriptor() ([]byte, []int)deprecated
- func (x *TemperatureRange) GetMax() float64
- func (x *TemperatureRange) GetMin() float64
- func (*TemperatureRange) ProtoMessage()
- func (x *TemperatureRange) ProtoReflect() protoreflect.Message
- func (x *TemperatureRange) Reset()
- func (x *TemperatureRange) String() string
- type UnimplementedWeatherServer
- type UnsafeWeatherServer
- type WeatherClient
- type WeatherCurrent
- func (*WeatherCurrent) Descriptor() ([]byte, []int)deprecated
- func (x *WeatherCurrent) GetHumidity() int32
- func (x *WeatherCurrent) GetIcon() string
- func (x *WeatherCurrent) GetTemperature() float64
- func (x *WeatherCurrent) GetTimestamp() uint64
- func (x *WeatherCurrent) GetWeather() WeatherType
- func (x *WeatherCurrent) GetWindSpeed() float64
- func (*WeatherCurrent) ProtoMessage()
- func (x *WeatherCurrent) ProtoReflect() protoreflect.Message
- func (x *WeatherCurrent) Reset()
- func (x *WeatherCurrent) String() string
- type WeatherDailyPoint
- func (*WeatherDailyPoint) Descriptor() ([]byte, []int)deprecated
- func (x *WeatherDailyPoint) GetHumidity() int32
- func (x *WeatherDailyPoint) GetIcon() string
- func (x *WeatherDailyPoint) GetTemperature() float64
- func (x *WeatherDailyPoint) GetTemperatureRange() *TemperatureRange
- func (x *WeatherDailyPoint) GetTimestamp() uint64
- func (x *WeatherDailyPoint) GetWeather() WeatherType
- func (*WeatherDailyPoint) ProtoMessage()
- func (x *WeatherDailyPoint) ProtoReflect() protoreflect.Message
- func (x *WeatherDailyPoint) Reset()
- func (x *WeatherDailyPoint) String() string
- type WeatherFilter
- type WeatherReply
- func (*WeatherReply) Descriptor() ([]byte, []int)deprecated
- func (x *WeatherReply) GetWeatherCurrent() *WeatherCurrent
- func (x *WeatherReply) GetWeatherPoint() []*WeatherDailyPoint
- func (*WeatherReply) ProtoMessage()
- func (x *WeatherReply) ProtoReflect() protoreflect.Message
- func (x *WeatherReply) Reset()
- func (x *WeatherReply) String() string
- type WeatherRequest
- type WeatherServer
- type WeatherType
- func (WeatherType) Descriptor() protoreflect.EnumDescriptor
- func (x WeatherType) Enum() *WeatherType
- func (WeatherType) EnumDescriptor() ([]byte, []int)deprecated
- func (x WeatherType) Number() protoreflect.EnumNumber
- func (x WeatherType) String() string
- func (WeatherType) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( WeatherType_name = map[int32]string{ 0: "UNKNOWN", 1: "THUNDERSTORM", 2: "DRIZZLE", 3: "RAIN", 4: "SNOW", 5: "MIST", 6: "SMOKE", 7: "HAZE", 8: "DUST", 9: "FOG", 10: "SAND", 11: "ASH", 12: "SQUALL", 13: "TORNADO", 14: "CLEAR", 15: "CLOUDS", } WeatherType_value = map[string]int32{ "UNKNOWN": 0, "THUNDERSTORM": 1, "DRIZZLE": 2, "RAIN": 3, "SNOW": 4, "MIST": 5, "SMOKE": 6, "HAZE": 7, "DUST": 8, "FOG": 9, "SAND": 10, "ASH": 11, "SQUALL": 12, "TORNADO": 13, "CLEAR": 14, "CLOUDS": 15, } )
Enum value maps for WeatherType.
var File_endpoints_v1_proto protoreflect.FileDescriptor
var Weather_ServiceDesc = grpc.ServiceDesc{ ServiceName: "endpoints.v1.Weather", HandlerType: (*WeatherServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetWeather", Handler: _Weather_GetWeather_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "endpoints.v1.proto", }
Weather_ServiceDesc is the grpc.ServiceDesc for Weather service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func BackendClient ¶
func BackendClient(envs config.Envs) *grpc.ClientConn
func RegisterWeatherServer ¶
func RegisterWeatherServer(s grpc.ServiceRegistrar, srv WeatherServer)
Types ¶
type TemperatureRange ¶
type TemperatureRange struct { Max float64 `protobuf:"fixed64,1,opt,name=max,proto3" json:"max,omitempty"` Min float64 `protobuf:"fixed64,2,opt,name=min,proto3" json:"min,omitempty"` // contains filtered or unexported fields }
func (*TemperatureRange) Descriptor
deprecated
func (*TemperatureRange) Descriptor() ([]byte, []int)
Deprecated: Use TemperatureRange.ProtoReflect.Descriptor instead.
func (*TemperatureRange) GetMax ¶
func (x *TemperatureRange) GetMax() float64
func (*TemperatureRange) GetMin ¶
func (x *TemperatureRange) GetMin() float64
func (*TemperatureRange) ProtoMessage ¶
func (*TemperatureRange) ProtoMessage()
func (*TemperatureRange) ProtoReflect ¶
func (x *TemperatureRange) ProtoReflect() protoreflect.Message
func (*TemperatureRange) Reset ¶
func (x *TemperatureRange) Reset()
func (*TemperatureRange) String ¶
func (x *TemperatureRange) String() string
type UnimplementedWeatherServer ¶
type UnimplementedWeatherServer struct { }
UnimplementedWeatherServer should be embedded to have forward compatible implementations.
func (UnimplementedWeatherServer) GetWeather ¶
func (UnimplementedWeatherServer) GetWeather(context.Context, *WeatherRequest) (*WeatherReply, error)
type UnsafeWeatherServer ¶
type UnsafeWeatherServer interface {
// contains filtered or unexported methods
}
UnsafeWeatherServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WeatherServer will result in compilation errors.
type WeatherClient ¶
type WeatherClient interface {
GetWeather(ctx context.Context, in *WeatherRequest, opts ...grpc.CallOption) (*WeatherReply, error)
}
WeatherClient is the client API for Weather 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 NewWeatherClient ¶
func NewWeatherClient(cc grpc.ClientConnInterface) WeatherClient
type WeatherCurrent ¶
type WeatherCurrent struct { Temperature float64 `protobuf:"fixed64,1,opt,name=temperature,proto3" json:"temperature,omitempty"` WindSpeed float64 `protobuf:"fixed64,2,opt,name=windSpeed,proto3" json:"windSpeed,omitempty"` Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Humidity int32 `protobuf:"varint,4,opt,name=humidity,proto3" json:"humidity,omitempty"` Weather WeatherType `protobuf:"varint,5,opt,name=weather,proto3,enum=endpoints.v1.WeatherType" json:"weather,omitempty"` Icon string `protobuf:"bytes,6,opt,name=icon,proto3" json:"icon,omitempty"` // contains filtered or unexported fields }
func (*WeatherCurrent) Descriptor
deprecated
func (*WeatherCurrent) Descriptor() ([]byte, []int)
Deprecated: Use WeatherCurrent.ProtoReflect.Descriptor instead.
func (*WeatherCurrent) GetHumidity ¶
func (x *WeatherCurrent) GetHumidity() int32
func (*WeatherCurrent) GetIcon ¶
func (x *WeatherCurrent) GetIcon() string
func (*WeatherCurrent) GetTemperature ¶
func (x *WeatherCurrent) GetTemperature() float64
func (*WeatherCurrent) GetTimestamp ¶
func (x *WeatherCurrent) GetTimestamp() uint64
func (*WeatherCurrent) GetWeather ¶
func (x *WeatherCurrent) GetWeather() WeatherType
func (*WeatherCurrent) GetWindSpeed ¶
func (x *WeatherCurrent) GetWindSpeed() float64
func (*WeatherCurrent) ProtoMessage ¶
func (*WeatherCurrent) ProtoMessage()
func (*WeatherCurrent) ProtoReflect ¶
func (x *WeatherCurrent) ProtoReflect() protoreflect.Message
func (*WeatherCurrent) Reset ¶
func (x *WeatherCurrent) Reset()
func (*WeatherCurrent) String ¶
func (x *WeatherCurrent) String() string
type WeatherDailyPoint ¶
type WeatherDailyPoint struct { Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Temperature float64 `protobuf:"fixed64,2,opt,name=temperature,proto3" json:"temperature,omitempty"` Humidity int32 `protobuf:"varint,3,opt,name=humidity,proto3" json:"humidity,omitempty"` TemperatureRange *TemperatureRange `protobuf:"bytes,4,opt,name=temperatureRange,proto3" json:"temperatureRange,omitempty"` Weather WeatherType `protobuf:"varint,5,opt,name=weather,proto3,enum=endpoints.v1.WeatherType" json:"weather,omitempty"` Icon string `protobuf:"bytes,6,opt,name=icon,proto3" json:"icon,omitempty"` // contains filtered or unexported fields }
func (*WeatherDailyPoint) Descriptor
deprecated
func (*WeatherDailyPoint) Descriptor() ([]byte, []int)
Deprecated: Use WeatherDailyPoint.ProtoReflect.Descriptor instead.
func (*WeatherDailyPoint) GetHumidity ¶
func (x *WeatherDailyPoint) GetHumidity() int32
func (*WeatherDailyPoint) GetIcon ¶
func (x *WeatherDailyPoint) GetIcon() string
func (*WeatherDailyPoint) GetTemperature ¶
func (x *WeatherDailyPoint) GetTemperature() float64
func (*WeatherDailyPoint) GetTemperatureRange ¶
func (x *WeatherDailyPoint) GetTemperatureRange() *TemperatureRange
func (*WeatherDailyPoint) GetTimestamp ¶
func (x *WeatherDailyPoint) GetTimestamp() uint64
func (*WeatherDailyPoint) GetWeather ¶
func (x *WeatherDailyPoint) GetWeather() WeatherType
func (*WeatherDailyPoint) ProtoMessage ¶
func (*WeatherDailyPoint) ProtoMessage()
func (*WeatherDailyPoint) ProtoReflect ¶
func (x *WeatherDailyPoint) ProtoReflect() protoreflect.Message
func (*WeatherDailyPoint) Reset ¶
func (x *WeatherDailyPoint) Reset()
func (*WeatherDailyPoint) String ¶
func (x *WeatherDailyPoint) String() string
type WeatherFilter ¶
type WeatherFilter struct { Location string `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"` // contains filtered or unexported fields }
func (*WeatherFilter) Descriptor
deprecated
func (*WeatherFilter) Descriptor() ([]byte, []int)
Deprecated: Use WeatherFilter.ProtoReflect.Descriptor instead.
func (*WeatherFilter) GetLocation ¶
func (x *WeatherFilter) GetLocation() string
func (*WeatherFilter) ProtoMessage ¶
func (*WeatherFilter) ProtoMessage()
func (*WeatherFilter) ProtoReflect ¶
func (x *WeatherFilter) ProtoReflect() protoreflect.Message
func (*WeatherFilter) Reset ¶
func (x *WeatherFilter) Reset()
func (*WeatherFilter) String ¶
func (x *WeatherFilter) String() string
type WeatherReply ¶
type WeatherReply struct { WeatherPoint []*WeatherDailyPoint `protobuf:"bytes,1,rep,name=weatherPoint,proto3" json:"weatherPoint,omitempty"` WeatherCurrent *WeatherCurrent `protobuf:"bytes,2,opt,name=weatherCurrent,proto3" json:"weatherCurrent,omitempty"` // contains filtered or unexported fields }
func (*WeatherReply) Descriptor
deprecated
func (*WeatherReply) Descriptor() ([]byte, []int)
Deprecated: Use WeatherReply.ProtoReflect.Descriptor instead.
func (*WeatherReply) GetWeatherCurrent ¶
func (x *WeatherReply) GetWeatherCurrent() *WeatherCurrent
func (*WeatherReply) GetWeatherPoint ¶
func (x *WeatherReply) GetWeatherPoint() []*WeatherDailyPoint
func (*WeatherReply) ProtoMessage ¶
func (*WeatherReply) ProtoMessage()
func (*WeatherReply) ProtoReflect ¶
func (x *WeatherReply) ProtoReflect() protoreflect.Message
func (*WeatherReply) Reset ¶
func (x *WeatherReply) Reset()
func (*WeatherReply) String ¶
func (x *WeatherReply) String() string
type WeatherRequest ¶
type WeatherRequest struct { WeatherFilter *WeatherFilter `protobuf:"bytes,1,opt,name=weatherFilter,proto3,oneof" json:"weatherFilter,omitempty"` // contains filtered or unexported fields }
func (*WeatherRequest) Descriptor
deprecated
func (*WeatherRequest) Descriptor() ([]byte, []int)
Deprecated: Use WeatherRequest.ProtoReflect.Descriptor instead.
func (*WeatherRequest) GetWeatherFilter ¶
func (x *WeatherRequest) GetWeatherFilter() *WeatherFilter
func (*WeatherRequest) ProtoMessage ¶
func (*WeatherRequest) ProtoMessage()
func (*WeatherRequest) ProtoReflect ¶
func (x *WeatherRequest) ProtoReflect() protoreflect.Message
func (*WeatherRequest) Reset ¶
func (x *WeatherRequest) Reset()
func (*WeatherRequest) String ¶
func (x *WeatherRequest) String() string
type WeatherServer ¶
type WeatherServer interface {
GetWeather(context.Context, *WeatherRequest) (*WeatherReply, error)
}
WeatherServer is the server API for Weather service. All implementations should embed UnimplementedWeatherServer for forward compatibility
type WeatherType ¶
type WeatherType int32
const ( WeatherType_UNKNOWN WeatherType = 0 WeatherType_THUNDERSTORM WeatherType = 1 WeatherType_DRIZZLE WeatherType = 2 WeatherType_RAIN WeatherType = 3 WeatherType_SNOW WeatherType = 4 WeatherType_MIST WeatherType = 5 WeatherType_SMOKE WeatherType = 6 WeatherType_HAZE WeatherType = 7 WeatherType_DUST WeatherType = 8 WeatherType_FOG WeatherType = 9 WeatherType_SAND WeatherType = 10 WeatherType_ASH WeatherType = 11 WeatherType_SQUALL WeatherType = 12 WeatherType_TORNADO WeatherType = 13 WeatherType_CLEAR WeatherType = 14 WeatherType_CLOUDS WeatherType = 15 )
func (WeatherType) Descriptor ¶
func (WeatherType) Descriptor() protoreflect.EnumDescriptor
func (WeatherType) Enum ¶
func (x WeatherType) Enum() *WeatherType
func (WeatherType) EnumDescriptor
deprecated
func (WeatherType) EnumDescriptor() ([]byte, []int)
Deprecated: Use WeatherType.Descriptor instead.
func (WeatherType) Number ¶
func (x WeatherType) Number() protoreflect.EnumNumber
func (WeatherType) String ¶
func (x WeatherType) String() string
func (WeatherType) Type ¶
func (WeatherType) Type() protoreflect.EnumType