Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterOtherHTTPServer(s *http.Server, srv OtherHTTPServer)
- func RegisterOtherServer(s grpc.ServiceRegistrar, srv OtherServer)
- type Empty
- type OtherClient
- type OtherHTTPClient
- type OtherHTTPClientImpl
- type OtherHTTPServer
- type OtherServer
- type Reply
- type UnimplementedOtherServer
- type UnsafeOtherServer
Constants ¶
const OperationOtherGetImageCaptcha = "/api.other.v1.Other/GetImageCaptcha"
const (
Other_GetImageCaptcha_FullMethodName = "/api.other.v1.Other/GetImageCaptcha"
)
Variables ¶
var File_other_v1_common_proto protoreflect.FileDescriptor
var File_other_v1_other_proto protoreflect.FileDescriptor
var Other_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.other.v1.Other", HandlerType: (*OtherServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetImageCaptcha", Handler: _Other_GetImageCaptcha_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "other/v1/other.proto", }
Other_ServiceDesc is the grpc.ServiceDesc for Other service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOtherHTTPServer ¶
func RegisterOtherHTTPServer(s *http.Server, srv OtherHTTPServer)
func RegisterOtherServer ¶
func RegisterOtherServer(s grpc.ServiceRegistrar, srv OtherServer)
Types ¶
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
空消息
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type OtherClient ¶
type OtherClient interface {
// 获取图形验证码
GetImageCaptcha(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Reply, error)
}
OtherClient is the client API for Other 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 NewOtherClient ¶
func NewOtherClient(cc grpc.ClientConnInterface) OtherClient
type OtherHTTPClient ¶
type OtherHTTPClient interface {
GetImageCaptcha(ctx context.Context, req *Empty, opts ...http.CallOption) (rsp *Reply, err error)
}
func NewOtherHTTPClient ¶
func NewOtherHTTPClient(client *http.Client) OtherHTTPClient
type OtherHTTPClientImpl ¶
type OtherHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*OtherHTTPClientImpl) GetImageCaptcha ¶
func (c *OtherHTTPClientImpl) GetImageCaptcha(ctx context.Context, in *Empty, opts ...http.CallOption) (*Reply, error)
type OtherHTTPServer ¶
type OtherServer ¶
type OtherServer interface {
// 获取图形验证码
GetImageCaptcha(context.Context, *Empty) (*Reply, error)
// contains filtered or unexported methods
}
OtherServer is the server API for Other service. All implementations must embed UnimplementedOtherServer for forward compatibility.
type Reply ¶
type Reply struct {
StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` // 状态码
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 提示信息
Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // json字符串
// contains filtered or unexported fields
}
func (*Reply) ProtoReflect ¶
func (x *Reply) ProtoReflect() protoreflect.Message
type UnimplementedOtherServer ¶
type UnimplementedOtherServer struct{}
UnimplementedOtherServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
type UnsafeOtherServer ¶
type UnsafeOtherServer interface {
// contains filtered or unexported methods
}
UnsafeOtherServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OtherServer will result in compilation errors.
Source Files
¶
- common.pb.go
- other.pb.go
- other_grpc.pb.go
- other_http.pb.go