forecasterpb

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_goadesign_goagen_forecaster_proto protoreflect.FileDescriptor
View Source
var Forecaster_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "forecaster.Forecaster",
	HandlerType: (*ForecasterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Forecast",
			Handler:    _Forecaster_Forecast_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "goadesign_goagen_forecaster.proto",
}

Forecaster_ServiceDesc is the grpc.ServiceDesc for Forecaster service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterForecasterServer

func RegisterForecasterServer(s grpc.ServiceRegistrar, srv ForecasterServer)

Types

type ForecastRequest

type ForecastRequest struct {

	// Latitude
	Lat float64 `protobuf:"fixed64,1,opt,name=lat,proto3" json:"lat,omitempty"`
	// Longitude
	Long float64 `protobuf:"fixed64,2,opt,name=long,proto3" json:"long,omitempty"`
	// contains filtered or unexported fields
}

func (*ForecastRequest) Descriptor deprecated

func (*ForecastRequest) Descriptor() ([]byte, []int)

Deprecated: Use ForecastRequest.ProtoReflect.Descriptor instead.

func (*ForecastRequest) GetLat

func (x *ForecastRequest) GetLat() float64

func (*ForecastRequest) GetLong

func (x *ForecastRequest) GetLong() float64

func (*ForecastRequest) ProtoMessage

func (*ForecastRequest) ProtoMessage()

func (*ForecastRequest) ProtoReflect

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

func (*ForecastRequest) Reset

func (x *ForecastRequest) Reset()

func (*ForecastRequest) String

func (x *ForecastRequest) String() string

type ForecastResponse

type ForecastResponse struct {

	// Forecast location
	Location *Location `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
	// Weather forecast periods
	Periods []*Period `protobuf:"bytes,2,rep,name=periods,proto3" json:"periods,omitempty"`
	// contains filtered or unexported fields
}

func (*ForecastResponse) Descriptor deprecated

func (*ForecastResponse) Descriptor() ([]byte, []int)

Deprecated: Use ForecastResponse.ProtoReflect.Descriptor instead.

func (*ForecastResponse) GetLocation

func (x *ForecastResponse) GetLocation() *Location

func (*ForecastResponse) GetPeriods

func (x *ForecastResponse) GetPeriods() []*Period

func (*ForecastResponse) ProtoMessage

func (*ForecastResponse) ProtoMessage()

func (*ForecastResponse) ProtoReflect

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

func (*ForecastResponse) Reset

func (x *ForecastResponse) Reset()

func (*ForecastResponse) String

func (x *ForecastResponse) String() string

type ForecasterClient

type ForecasterClient interface {
	// Retrieve weather forecast for a given location
	Forecast(ctx context.Context, in *ForecastRequest, opts ...grpc.CallOption) (*ForecastResponse, error)
}

ForecasterClient is the client API for Forecaster 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 NewForecasterClient

func NewForecasterClient(cc grpc.ClientConnInterface) ForecasterClient

type ForecasterServer

type ForecasterServer interface {
	// Retrieve weather forecast for a given location
	Forecast(context.Context, *ForecastRequest) (*ForecastResponse, error)
	// contains filtered or unexported methods
}

ForecasterServer is the server API for Forecaster service. All implementations must embed UnimplementedForecasterServer for forward compatibility

type Location

type Location struct {

	// Latitude
	Lat float64 `protobuf:"fixed64,1,opt,name=lat,proto3" json:"lat,omitempty"`
	// Longitude
	Long float64 `protobuf:"fixed64,2,opt,name=long,proto3" json:"long,omitempty"`
	// City
	City string `protobuf:"bytes,3,opt,name=city,proto3" json:"city,omitempty"`
	// State
	State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

Geographical location

func (*Location) Descriptor deprecated

func (*Location) Descriptor() ([]byte, []int)

Deprecated: Use Location.ProtoReflect.Descriptor instead.

func (*Location) GetCity

func (x *Location) GetCity() string

func (*Location) GetLat

func (x *Location) GetLat() float64

func (*Location) GetLong

func (x *Location) GetLong() float64

func (*Location) GetState

func (x *Location) GetState() string

func (*Location) ProtoMessage

func (*Location) ProtoMessage()

func (*Location) ProtoReflect

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

func (*Location) Reset

func (x *Location) Reset()

func (*Location) String

func (x *Location) String() string

type Period

type Period struct {

	// Period name
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Start time
	StartTime string `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// End time
	EndTime string `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// Temperature
	Temperature int32 `protobuf:"zigzag32,4,opt,name=temperature,proto3" json:"temperature,omitempty"`
	// Temperature unit
	TemperatureUnit string `protobuf:"bytes,5,opt,name=temperature_unit,json=temperatureUnit,proto3" json:"temperature_unit,omitempty"`
	// Summary
	Summary string `protobuf:"bytes,6,opt,name=summary,proto3" json:"summary,omitempty"`
	// contains filtered or unexported fields
}

Weather forecast period

func (*Period) Descriptor deprecated

func (*Period) Descriptor() ([]byte, []int)

Deprecated: Use Period.ProtoReflect.Descriptor instead.

func (*Period) GetEndTime

func (x *Period) GetEndTime() string

func (*Period) GetName

func (x *Period) GetName() string

func (*Period) GetStartTime

func (x *Period) GetStartTime() string

func (*Period) GetSummary

func (x *Period) GetSummary() string

func (*Period) GetTemperature

func (x *Period) GetTemperature() int32

func (*Period) GetTemperatureUnit

func (x *Period) GetTemperatureUnit() string

func (*Period) ProtoMessage

func (*Period) ProtoMessage()

func (*Period) ProtoReflect

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

func (*Period) Reset

func (x *Period) Reset()

func (*Period) String

func (x *Period) String() string

type UnimplementedForecasterServer

type UnimplementedForecasterServer struct {
}

UnimplementedForecasterServer must be embedded to have forward compatible implementations.

func (UnimplementedForecasterServer) Forecast

type UnsafeForecasterServer

type UnsafeForecasterServer interface {
	// contains filtered or unexported methods
}

UnsafeForecasterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ForecasterServer will result in compilation errors.

Jump to

Keyboard shortcuts

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