server

package
v0.0.0-...-c4e7f1b Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_weatherforecast_proto protoreflect.FileDescriptor
View Source
var WeatherForecast_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "WeatherForecast",
	HandlerType: (*WeatherForecastServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetWeatherForecastByCityName",
			Handler:    _WeatherForecast_GetWeatherForecastByCityName_Handler,
		},
		{
			MethodName: "FillWeatherForecast",
			Handler:    _WeatherForecast_FillWeatherForecast_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "weatherforecast.proto",
}

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

Functions

func RegisterWeatherForecastServer

func RegisterWeatherForecastServer(s grpc.ServiceRegistrar, srv WeatherForecastServer)

Types

type FillWeatherForecastRequest

type FillWeatherForecastRequest struct {
	CityName string `protobuf:"bytes,1,opt,name=cityName,proto3" json:"cityName,omitempty"`
	// contains filtered or unexported fields
}

func (*FillWeatherForecastRequest) Descriptor deprecated

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

Deprecated: Use FillWeatherForecastRequest.ProtoReflect.Descriptor instead.

func (*FillWeatherForecastRequest) GetCityName

func (x *FillWeatherForecastRequest) GetCityName() string

func (*FillWeatherForecastRequest) ProtoMessage

func (*FillWeatherForecastRequest) ProtoMessage()

func (*FillWeatherForecastRequest) ProtoReflect

func (*FillWeatherForecastRequest) Reset

func (x *FillWeatherForecastRequest) Reset()

func (*FillWeatherForecastRequest) String

func (x *FillWeatherForecastRequest) String() string

type GetWeatherForecastByCityNameRequest

type GetWeatherForecastByCityNameRequest struct {
	CityName string `protobuf:"bytes,1,opt,name=cityName,proto3" json:"cityName,omitempty"`
	// contains filtered or unexported fields
}

func (*GetWeatherForecastByCityNameRequest) Descriptor deprecated

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

Deprecated: Use GetWeatherForecastByCityNameRequest.ProtoReflect.Descriptor instead.

func (*GetWeatherForecastByCityNameRequest) GetCityName

func (*GetWeatherForecastByCityNameRequest) ProtoMessage

func (*GetWeatherForecastByCityNameRequest) ProtoMessage()

func (*GetWeatherForecastByCityNameRequest) ProtoReflect

func (*GetWeatherForecastByCityNameRequest) Reset

func (*GetWeatherForecastByCityNameRequest) String

type GetWeatherForecastByCityNameResponse

type GetWeatherForecastByCityNameResponse struct {
	Data *WeatherForecastResult `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*GetWeatherForecastByCityNameResponse) Descriptor deprecated

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

Deprecated: Use GetWeatherForecastByCityNameResponse.ProtoReflect.Descriptor instead.

func (*GetWeatherForecastByCityNameResponse) GetData

func (*GetWeatherForecastByCityNameResponse) ProtoMessage

func (*GetWeatherForecastByCityNameResponse) ProtoMessage()

func (*GetWeatherForecastByCityNameResponse) ProtoReflect

func (*GetWeatherForecastByCityNameResponse) Reset

func (*GetWeatherForecastByCityNameResponse) String

type UnimplementedWeatherForecastServer

type UnimplementedWeatherForecastServer struct {
}

UnimplementedWeatherForecastServer must be embedded to have forward compatible implementations.

func (UnimplementedWeatherForecastServer) FillWeatherForecast

type UnsafeWeatherForecastServer

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

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

type WeatherForecastClient

type WeatherForecastClient interface {
	GetWeatherForecastByCityName(ctx context.Context, in *GetWeatherForecastByCityNameRequest, opts ...grpc.CallOption) (*GetWeatherForecastByCityNameResponse, error)
	FillWeatherForecast(ctx context.Context, in *FillWeatherForecastRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

WeatherForecastClient is the client API for WeatherForecast 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 WeatherForecastResult

type WeatherForecastResult struct {
	Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*WeatherForecastResult) Descriptor deprecated

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

Deprecated: Use WeatherForecastResult.ProtoReflect.Descriptor instead.

func (*WeatherForecastResult) GetResult

func (x *WeatherForecastResult) GetResult() string

func (*WeatherForecastResult) ProtoMessage

func (*WeatherForecastResult) ProtoMessage()

func (*WeatherForecastResult) ProtoReflect

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

func (*WeatherForecastResult) Reset

func (x *WeatherForecastResult) Reset()

func (*WeatherForecastResult) String

func (x *WeatherForecastResult) String() string

type WeatherForecastServer

type WeatherForecastServer interface {
	GetWeatherForecastByCityName(context.Context, *GetWeatherForecastByCityNameRequest) (*GetWeatherForecastByCityNameResponse, error)
	FillWeatherForecast(context.Context, *FillWeatherForecastRequest) (*empty.Empty, error)
	// contains filtered or unexported methods
}

WeatherForecastServer is the server API for WeatherForecast service. All implementations must embed UnimplementedWeatherForecastServer for forward compatibility

Jump to

Keyboard shortcuts

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