openweather

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_openweather_openweatherv1_proto protoreflect.FileDescriptor
View Source
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.

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

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) Descriptor() ([]byte, []int)

Deprecated: Use Weather.ProtoReflect.Descriptor instead.

func (*Weather) GetLocation

func (x *Weather) GetLocation() *location.Location

func (*Weather) GetReadTime

func (x *Weather) GetReadTime() *timestamppb.Timestamp

func (*Weather) GetTemp

func (x *Weather) GetTemp() float64

func (*Weather) GetWindSpeed

func (x *Weather) GetWindSpeed() float64

func (*Weather) ProtoMessage

func (*Weather) ProtoMessage()

func (*Weather) ProtoReflect

func (x *Weather) ProtoReflect() protoreflect.Message

func (*Weather) Reset

func (x *Weather) Reset()

func (*Weather) String

func (x *Weather) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL