Documentation
¶
Index ¶
- Variables
- func RegisterForecasterServer(s grpc.ServiceRegistrar, srv ForecasterServer)
- type ForecastRequest
- func (*ForecastRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ForecastRequest) GetLat() float64
- func (x *ForecastRequest) GetLong() float64
- func (*ForecastRequest) ProtoMessage()
- func (x *ForecastRequest) ProtoReflect() protoreflect.Message
- func (x *ForecastRequest) Reset()
- func (x *ForecastRequest) String() string
- type ForecastResponse
- func (*ForecastResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ForecastResponse) GetLocation() *Location
- func (x *ForecastResponse) GetPeriods() []*Period
- func (*ForecastResponse) ProtoMessage()
- func (x *ForecastResponse) ProtoReflect() protoreflect.Message
- func (x *ForecastResponse) Reset()
- func (x *ForecastResponse) String() string
- type ForecasterClient
- type ForecasterServer
- type Location
- func (*Location) Descriptor() ([]byte, []int)deprecated
- func (x *Location) GetCity() string
- func (x *Location) GetLat() float64
- func (x *Location) GetLong() float64
- func (x *Location) GetState() string
- func (*Location) ProtoMessage()
- func (x *Location) ProtoReflect() protoreflect.Message
- func (x *Location) Reset()
- func (x *Location) String() string
- type Period
- func (*Period) Descriptor() ([]byte, []int)deprecated
- func (x *Period) GetEndTime() string
- func (x *Period) GetName() string
- func (x *Period) GetStartTime() string
- func (x *Period) GetSummary() string
- func (x *Period) GetTemperature() int32
- func (x *Period) GetTemperatureUnit() string
- func (*Period) ProtoMessage()
- func (x *Period) ProtoReflect() protoreflect.Message
- func (x *Period) Reset()
- func (x *Period) String() string
- type UnimplementedForecasterServer
- type UnsafeForecasterServer
Constants ¶
This section is empty.
Variables ¶
var File_goadesign_goagen_forecaster_proto protoreflect.FileDescriptor
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) ProtoMessage ¶
func (*Location) ProtoMessage()
func (*Location) ProtoReflect ¶
func (x *Location) ProtoReflect() protoreflect.Message
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) GetEndTime ¶
func (*Period) GetStartTime ¶
func (*Period) GetSummary ¶
func (*Period) GetTemperature ¶
func (*Period) GetTemperatureUnit ¶
func (*Period) ProtoMessage ¶
func (*Period) ProtoMessage()
func (*Period) ProtoReflect ¶
func (x *Period) ProtoReflect() protoreflect.Message
type UnimplementedForecasterServer ¶
type UnimplementedForecasterServer struct { }
UnimplementedForecasterServer must be embedded to have forward compatible implementations.
func (UnimplementedForecasterServer) Forecast ¶
func (UnimplementedForecasterServer) Forecast(context.Context, *ForecastRequest) (*ForecastResponse, error)
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.