api

package
v0.0.0-...-3d67f7f Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_api_proto protoreflect.FileDescriptor
View Source
var Time_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.Time",
	HandlerType: (*TimeServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetTime",
			Handler:    _Time_GetTime_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/api.proto",
}

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

Functions

func RegisterTimeServer

func RegisterTimeServer(s grpc.ServiceRegistrar, srv TimeServer)

Types

type TimeClient

type TimeClient interface {
	GetTime(ctx context.Context, in *TimeRequest, opts ...grpc.CallOption) (*TimeResponse, error)
}

TimeClient is the client API for Time 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 NewTimeClient

func NewTimeClient(cc grpc.ClientConnInterface) TimeClient

type TimeRequest

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

func (*TimeRequest) Descriptor deprecated

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

Deprecated: Use TimeRequest.ProtoReflect.Descriptor instead.

func (*TimeRequest) GetTimezone

func (x *TimeRequest) GetTimezone() string

func (*TimeRequest) ProtoMessage

func (*TimeRequest) ProtoMessage()

func (*TimeRequest) ProtoReflect

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

func (*TimeRequest) Reset

func (x *TimeRequest) Reset()

func (*TimeRequest) String

func (x *TimeRequest) String() string

type TimeResponse

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

func (*TimeResponse) Descriptor deprecated

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

Deprecated: Use TimeResponse.ProtoReflect.Descriptor instead.

func (*TimeResponse) GetTime

func (x *TimeResponse) GetTime() string

func (*TimeResponse) ProtoMessage

func (*TimeResponse) ProtoMessage()

func (*TimeResponse) ProtoReflect

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

func (*TimeResponse) Reset

func (x *TimeResponse) Reset()

func (*TimeResponse) String

func (x *TimeResponse) String() string

type TimeServer

type TimeServer interface {
	GetTime(context.Context, *TimeRequest) (*TimeResponse, error)
	// contains filtered or unexported methods
}

TimeServer is the server API for Time service. All implementations must embed UnimplementedTimeServer for forward compatibility

type UnimplementedTimeServer

type UnimplementedTimeServer struct {
}

UnimplementedTimeServer must be embedded to have forward compatible implementations.

func (UnimplementedTimeServer) GetTime

type UnsafeTimeServer

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

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

Jump to

Keyboard shortcuts

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