v1

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Unlicense Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TZFService_Ping_FullMethodName            = "/tzf.v1.TZFService/Ping"
	TZFService_GetTimezone_FullMethodName     = "/tzf.v1.TZFService/GetTimezone"
	TZFService_GetTimezones_FullMethodName    = "/tzf.v1.TZFService/GetTimezones"
	TZFService_GetAllTimezones_FullMethodName = "/tzf.v1.TZFService/GetAllTimezones"
)
View Source
const OperationTZFServiceGetAllTimezones = "/tzf.v1.TZFService/GetAllTimezones"
View Source
const OperationTZFServiceGetTimezone = "/tzf.v1.TZFService/GetTimezone"
View Source
const OperationTZFServiceGetTimezones = "/tzf.v1.TZFService/GetTimezones"
View Source
const OperationTZFServicePing = "/tzf.v1.TZFService/Ping"

Variables

View Source
var File_tzf_v1_api_proto protoreflect.FileDescriptor
View Source
var TZFService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tzf.v1.TZFService",
	HandlerType: (*TZFServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _TZFService_Ping_Handler,
		},
		{
			MethodName: "GetTimezone",
			Handler:    _TZFService_GetTimezone_Handler,
		},
		{
			MethodName: "GetTimezones",
			Handler:    _TZFService_GetTimezones_Handler,
		},
		{
			MethodName: "GetAllTimezones",
			Handler:    _TZFService_GetAllTimezones_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "tzf/v1/api.proto",
}

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

Functions

func BindDefaultSwagger added in v0.13.0

func BindDefaultSwagger(h *server.Hertz)

func BindSwagger added in v0.13.0

func BindSwagger(h *server.Hertz, openAPIYAMLPath string, swaggerPath string)

func RegisterTZFServiceHTTPServer

func RegisterTZFServiceHTTPServer(h *server.Hertz, srv TZFServiceHTTPServer)

func RegisterTZFServiceServer

func RegisterTZFServiceServer(s grpc.ServiceRegistrar, srv TZFServiceServer)

Types

type GetAllTimezonesRequest

type GetAllTimezonesRequest struct {
	// contains filtered or unexported fields
}

func (*GetAllTimezonesRequest) Descriptor deprecated

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

Deprecated: Use GetAllTimezonesRequest.ProtoReflect.Descriptor instead.

func (*GetAllTimezonesRequest) ProtoMessage

func (*GetAllTimezonesRequest) ProtoMessage()

func (*GetAllTimezonesRequest) ProtoReflect

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

func (*GetAllTimezonesRequest) Reset

func (x *GetAllTimezonesRequest) Reset()

func (*GetAllTimezonesRequest) String

func (x *GetAllTimezonesRequest) String() string

type GetAllTimezonesResponse

type GetAllTimezonesResponse struct {
	Timezones []*GetTimezoneResponse `protobuf:"bytes,1,rep,name=timezones,proto3" json:"timezones,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAllTimezonesResponse) Descriptor deprecated

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

Deprecated: Use GetAllTimezonesResponse.ProtoReflect.Descriptor instead.

func (*GetAllTimezonesResponse) GetTimezones

func (x *GetAllTimezonesResponse) GetTimezones() []*GetTimezoneResponse

func (*GetAllTimezonesResponse) ProtoMessage

func (*GetAllTimezonesResponse) ProtoMessage()

func (*GetAllTimezonesResponse) ProtoReflect

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

func (*GetAllTimezonesResponse) Reset

func (x *GetAllTimezonesResponse) Reset()

func (*GetAllTimezonesResponse) String

func (x *GetAllTimezonesResponse) String() string

type GetTimezoneRequest

type GetTimezoneRequest struct {
	Longitude float64 `protobuf:"fixed64,1,opt,name=longitude,proto3" json:"longitude,omitempty" query:"longitude" vd:"$>=-180 && $<=180"`

	Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty" query:"latitude" vd:"$>=-90 && $<=90"`
	// contains filtered or unexported fields
}

func (*GetTimezoneRequest) Descriptor deprecated

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

Deprecated: Use GetTimezoneRequest.ProtoReflect.Descriptor instead.

func (*GetTimezoneRequest) GetLatitude

func (x *GetTimezoneRequest) GetLatitude() float64

func (*GetTimezoneRequest) GetLongitude

func (x *GetTimezoneRequest) GetLongitude() float64

func (*GetTimezoneRequest) ProtoMessage

func (*GetTimezoneRequest) ProtoMessage()

func (*GetTimezoneRequest) ProtoReflect

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

func (*GetTimezoneRequest) Reset

func (x *GetTimezoneRequest) Reset()

func (*GetTimezoneRequest) String

func (x *GetTimezoneRequest) String() string

type GetTimezoneResponse

type GetTimezoneResponse struct {
	Timezone     string               `protobuf:"bytes,1,opt,name=timezone,proto3" json:"timezone,omitempty"`         // timezone name
	Abbreviation string               `protobuf:"bytes,2,opt,name=abbreviation,proto3" json:"abbreviation,omitempty"` // timezone abbreviation
	Offset       *durationpb.Duration `protobuf:"bytes,3,opt,name=offset,proto3" json:"offset,omitempty"`             // timezone offset
	// contains filtered or unexported fields
}

func (*GetTimezoneResponse) Descriptor deprecated

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

Deprecated: Use GetTimezoneResponse.ProtoReflect.Descriptor instead.

func (*GetTimezoneResponse) GetAbbreviation

func (x *GetTimezoneResponse) GetAbbreviation() string

func (*GetTimezoneResponse) GetOffset

func (x *GetTimezoneResponse) GetOffset() *durationpb.Duration

func (*GetTimezoneResponse) GetTimezone

func (x *GetTimezoneResponse) GetTimezone() string

func (*GetTimezoneResponse) ProtoMessage

func (*GetTimezoneResponse) ProtoMessage()

func (*GetTimezoneResponse) ProtoReflect

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

func (*GetTimezoneResponse) Reset

func (x *GetTimezoneResponse) Reset()

func (*GetTimezoneResponse) String

func (x *GetTimezoneResponse) String() string

type GetTimezonesRequest

type GetTimezonesRequest struct {
	Longitude float64 `protobuf:"fixed64,1,opt,name=longitude,proto3" json:"longitude,omitempty" query:"longitude" vd:"$>=-180 && $<=180"`

	Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty" query:"latitude" vd:"$>=-90 && $<=90"`
	// contains filtered or unexported fields
}

func (*GetTimezonesRequest) Descriptor deprecated

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

Deprecated: Use GetTimezonesRequest.ProtoReflect.Descriptor instead.

func (*GetTimezonesRequest) GetLatitude

func (x *GetTimezonesRequest) GetLatitude() float64

func (*GetTimezonesRequest) GetLongitude

func (x *GetTimezonesRequest) GetLongitude() float64

func (*GetTimezonesRequest) ProtoMessage

func (*GetTimezonesRequest) ProtoMessage()

func (*GetTimezonesRequest) ProtoReflect

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

func (*GetTimezonesRequest) Reset

func (x *GetTimezonesRequest) Reset()

func (*GetTimezonesRequest) String

func (x *GetTimezonesRequest) String() string

type GetTimezonesResponse

type GetTimezonesResponse struct {
	Timezones []*GetTimezoneResponse `protobuf:"bytes,1,rep,name=timezones,proto3" json:"timezones,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTimezonesResponse) Descriptor deprecated

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

Deprecated: Use GetTimezonesResponse.ProtoReflect.Descriptor instead.

func (*GetTimezonesResponse) GetTimezones

func (x *GetTimezonesResponse) GetTimezones() []*GetTimezoneResponse

func (*GetTimezonesResponse) ProtoMessage

func (*GetTimezonesResponse) ProtoMessage()

func (*GetTimezonesResponse) ProtoReflect

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

func (*GetTimezonesResponse) Reset

func (x *GetTimezonesResponse) Reset()

func (*GetTimezonesResponse) String

func (x *GetTimezonesResponse) String() string

type MockTZFServiceClient added in v0.13.0

type MockTZFServiceClient struct {
	// contains filtered or unexported fields
}

MockTZFServiceClient is a mock of TZFServiceClient interface.

func NewMockTZFServiceClient added in v0.13.0

func NewMockTZFServiceClient(ctrl *gomock.Controller) *MockTZFServiceClient

NewMockTZFServiceClient creates a new mock instance.

func (*MockTZFServiceClient) EXPECT added in v0.13.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTZFServiceClient) GetAllTimezones added in v0.13.0

GetAllTimezones mocks base method.

func (*MockTZFServiceClient) GetTimezone added in v0.13.0

GetTimezone mocks base method.

func (*MockTZFServiceClient) GetTimezones added in v0.13.0

GetTimezones mocks base method.

func (*MockTZFServiceClient) Ping added in v0.13.0

Ping mocks base method.

type MockTZFServiceClientMockRecorder added in v0.13.0

type MockTZFServiceClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockTZFServiceClientMockRecorder is the mock recorder for MockTZFServiceClient.

func (*MockTZFServiceClientMockRecorder) GetAllTimezones added in v0.13.0

func (mr *MockTZFServiceClientMockRecorder) GetAllTimezones(ctx, in interface{}, opts ...interface{}) *gomock.Call

GetAllTimezones indicates an expected call of GetAllTimezones.

func (*MockTZFServiceClientMockRecorder) GetTimezone added in v0.13.0

func (mr *MockTZFServiceClientMockRecorder) GetTimezone(ctx, in interface{}, opts ...interface{}) *gomock.Call

GetTimezone indicates an expected call of GetTimezone.

func (*MockTZFServiceClientMockRecorder) GetTimezones added in v0.13.0

func (mr *MockTZFServiceClientMockRecorder) GetTimezones(ctx, in interface{}, opts ...interface{}) *gomock.Call

GetTimezones indicates an expected call of GetTimezones.

func (*MockTZFServiceClientMockRecorder) Ping added in v0.13.0

func (mr *MockTZFServiceClientMockRecorder) Ping(ctx, in interface{}, opts ...interface{}) *gomock.Call

Ping indicates an expected call of Ping.

type MockTZFServiceServer added in v0.13.0

type MockTZFServiceServer struct {
	// contains filtered or unexported fields
}

MockTZFServiceServer is a mock of TZFServiceServer interface.

func NewMockTZFServiceServer added in v0.13.0

func NewMockTZFServiceServer(ctrl *gomock.Controller) *MockTZFServiceServer

NewMockTZFServiceServer creates a new mock instance.

func (*MockTZFServiceServer) EXPECT added in v0.13.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTZFServiceServer) GetAllTimezones added in v0.13.0

GetAllTimezones mocks base method.

func (*MockTZFServiceServer) GetTimezone added in v0.13.0

GetTimezone mocks base method.

func (*MockTZFServiceServer) GetTimezones added in v0.13.0

GetTimezones mocks base method.

func (*MockTZFServiceServer) Ping added in v0.13.0

Ping mocks base method.

type MockTZFServiceServerMockRecorder added in v0.13.0

type MockTZFServiceServerMockRecorder struct {
	// contains filtered or unexported fields
}

MockTZFServiceServerMockRecorder is the mock recorder for MockTZFServiceServer.

func (*MockTZFServiceServerMockRecorder) GetAllTimezones added in v0.13.0

func (mr *MockTZFServiceServerMockRecorder) GetAllTimezones(ctx, in interface{}) *gomock.Call

GetAllTimezones indicates an expected call of GetAllTimezones.

func (*MockTZFServiceServerMockRecorder) GetTimezone added in v0.13.0

func (mr *MockTZFServiceServerMockRecorder) GetTimezone(ctx, in interface{}) *gomock.Call

GetTimezone indicates an expected call of GetTimezone.

func (*MockTZFServiceServerMockRecorder) GetTimezones added in v0.13.0

func (mr *MockTZFServiceServerMockRecorder) GetTimezones(ctx, in interface{}) *gomock.Call

GetTimezones indicates an expected call of GetTimezones.

func (*MockTZFServiceServerMockRecorder) Ping added in v0.13.0

func (mr *MockTZFServiceServerMockRecorder) Ping(ctx, in interface{}) *gomock.Call

Ping indicates an expected call of Ping.

type PingRequest added in v0.13.0

type PingRequest struct {
	// contains filtered or unexported fields
}

func (*PingRequest) Descriptor deprecated added in v0.13.0

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) ProtoMessage added in v0.13.0

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect added in v0.13.0

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

func (*PingRequest) Reset added in v0.13.0

func (x *PingRequest) Reset()

func (*PingRequest) String added in v0.13.0

func (x *PingRequest) String() string

type PingResponse added in v0.13.0

type PingResponse struct {
	// contains filtered or unexported fields
}

func (*PingResponse) Descriptor deprecated added in v0.13.0

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

Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.

func (*PingResponse) ProtoMessage added in v0.13.0

func (*PingResponse) ProtoMessage()

func (*PingResponse) ProtoReflect added in v0.13.0

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

func (*PingResponse) Reset added in v0.13.0

func (x *PingResponse) Reset()

func (*PingResponse) String added in v0.13.0

func (x *PingResponse) String() string

type TZFServiceClient

type TZFServiceClient interface {
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
	// GetTimezone returns timezone name by longitude and latitude.
	GetTimezone(ctx context.Context, in *GetTimezoneRequest, opts ...grpc.CallOption) (*GetTimezoneResponse, error)
	// GetTimezones returns timezone names by longitude and latitude.
	GetTimezones(ctx context.Context, in *GetTimezonesRequest, opts ...grpc.CallOption) (*GetTimezonesResponse, error)
	// GetAllTimezones returns all timezone names.
	GetAllTimezones(ctx context.Context, in *GetAllTimezonesRequest, opts ...grpc.CallOption) (*GetAllTimezonesResponse, error)
}

TZFServiceClient is the client API for TZFService 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 NewTZFServiceClient

func NewTZFServiceClient(cc grpc.ClientConnInterface) TZFServiceClient

type TZFServiceHTTPServer

type TZFServiceHTTPServer interface {
	// GetAllTimezones GetAllTimezones returns all timezone names.
	GetAllTimezones(context.Context, *GetAllTimezonesRequest) (*GetAllTimezonesResponse, error)
	// GetTimezone GetTimezone returns timezone name by longitude and latitude.
	GetTimezone(context.Context, *GetTimezoneRequest) (*GetTimezoneResponse, error)
	// GetTimezones GetTimezones returns timezone names by longitude and latitude.
	GetTimezones(context.Context, *GetTimezonesRequest) (*GetTimezonesResponse, error)
	Ping(context.Context, *PingRequest) (*PingResponse, error)
}

type TZFServiceServer

type TZFServiceServer interface {
	Ping(context.Context, *PingRequest) (*PingResponse, error)
	// GetTimezone returns timezone name by longitude and latitude.
	GetTimezone(context.Context, *GetTimezoneRequest) (*GetTimezoneResponse, error)
	// GetTimezones returns timezone names by longitude and latitude.
	GetTimezones(context.Context, *GetTimezonesRequest) (*GetTimezonesResponse, error)
	// GetAllTimezones returns all timezone names.
	GetAllTimezones(context.Context, *GetAllTimezonesRequest) (*GetAllTimezonesResponse, error)
	// contains filtered or unexported methods
}

TZFServiceServer is the server API for TZFService service. All implementations must embed UnimplementedTZFServiceServer for forward compatibility

type UnimplementedTZFServiceServer

type UnimplementedTZFServiceServer struct {
}

UnimplementedTZFServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTZFServiceServer) GetAllTimezones

func (UnimplementedTZFServiceServer) GetTimezone

func (UnimplementedTZFServiceServer) GetTimezones

func (UnimplementedTZFServiceServer) Ping added in v0.13.0

type UnsafeTZFServiceServer

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

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

Jump to

Keyboard shortcuts

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