Documentation ¶
Overview ¶
Package protobuf is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterHelloServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterHelloServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HelloServiceClient) error
- func RegisterHelloServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterHelloServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HelloServiceServer) error
- func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer)
- func RegisterMpcServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMpcServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MpcServiceClient) error
- func RegisterMpcServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMpcServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MpcServiceServer) error
- func RegisterMpcServiceServer(s grpc.ServiceRegistrar, srv MpcServiceServer)
- func RegisterSinohopeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSinohopeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SinohopeServiceClient) error
- func RegisterSinohopeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSinohopeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SinohopeServiceServer) error
- func RegisterSinohopeServiceServer(s grpc.ServiceRegistrar, srv SinohopeServiceServer)
- type HelloServiceClient
- type HelloServiceServer
- type MpcServiceClient
- type MpcServiceServer
- type SinohopeServiceClient
- type SinohopeServiceServer
- type UnimplementedHelloServiceServer
- type UnimplementedMpcServiceServer
- type UnimplementedSinohopeServiceServer
- type UnsafeHelloServiceServer
- type UnsafeMpcServiceServer
- type UnsafeSinohopeServiceServer
Constants ¶
const ( SinohopeService_TransactionNotify_FullMethodName = "/api.protobuf.SinohopeService/TransactionNotify" SinohopeService_WithdrawalConfirm_FullMethodName = "/api.protobuf.SinohopeService/WithdrawalConfirm" )
const (
HelloService_GetHello_FullMethodName = "/api.protobuf.HelloService/GetHello"
)
const (
MpcService_MpcCheck_FullMethodName = "/api.protobuf.MpcService/MpcCheck"
)
Variables ¶
var File_api_protobuf_api_proto protoreflect.FileDescriptor
var HelloService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.protobuf.HelloService", HandlerType: (*HelloServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetHello", Handler: _HelloService_GetHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/protobuf/api.proto", }
HelloService_ServiceDesc is the grpc.ServiceDesc for HelloService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var MpcService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.protobuf.MpcService", HandlerType: (*MpcServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "MpcCheck", Handler: _MpcService_MpcCheck_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/protobuf/api.proto", }
MpcService_ServiceDesc is the grpc.ServiceDesc for MpcService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var SinohopeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.protobuf.SinohopeService", HandlerType: (*SinohopeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TransactionNotify", Handler: _SinohopeService_TransactionNotify_Handler, }, { MethodName: "WithdrawalConfirm", Handler: _SinohopeService_WithdrawalConfirm_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/protobuf/api.proto", }
SinohopeService_ServiceDesc is the grpc.ServiceDesc for SinohopeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHelloServiceHandler ¶
func RegisterHelloServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterHelloServiceHandler registers the http handlers for service HelloService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterHelloServiceHandlerClient ¶
func RegisterHelloServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HelloServiceClient) error
RegisterHelloServiceHandlerClient registers the http handlers for service HelloService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HelloServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HelloServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "HelloServiceClient" to call the correct interceptors.
func RegisterHelloServiceHandlerFromEndpoint ¶
func RegisterHelloServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterHelloServiceHandlerFromEndpoint is same as RegisterHelloServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterHelloServiceHandlerServer ¶
func RegisterHelloServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HelloServiceServer) error
RegisterHelloServiceHandlerServer registers the http handlers for service HelloService to "mux". UnaryRPC :call HelloServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterHelloServiceHandlerFromEndpoint instead.
func RegisterHelloServiceServer ¶
func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer)
func RegisterMpcServiceHandler ¶ added in v1.1.0
func RegisterMpcServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMpcServiceHandler registers the http handlers for service MpcService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMpcServiceHandlerClient ¶ added in v1.1.0
func RegisterMpcServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MpcServiceClient) error
RegisterMpcServiceHandlerClient registers the http handlers for service MpcService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MpcServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MpcServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MpcServiceClient" to call the correct interceptors.
func RegisterMpcServiceHandlerFromEndpoint ¶ added in v1.1.0
func RegisterMpcServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMpcServiceHandlerFromEndpoint is same as RegisterMpcServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMpcServiceHandlerServer ¶ added in v1.1.0
func RegisterMpcServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MpcServiceServer) error
RegisterMpcServiceHandlerServer registers the http handlers for service MpcService to "mux". UnaryRPC :call MpcServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMpcServiceHandlerFromEndpoint instead.
func RegisterMpcServiceServer ¶ added in v1.1.0
func RegisterMpcServiceServer(s grpc.ServiceRegistrar, srv MpcServiceServer)
func RegisterSinohopeServiceHandler ¶ added in v1.1.0
func RegisterSinohopeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSinohopeServiceHandler registers the http handlers for service SinohopeService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSinohopeServiceHandlerClient ¶ added in v1.1.0
func RegisterSinohopeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SinohopeServiceClient) error
RegisterSinohopeServiceHandlerClient registers the http handlers for service SinohopeService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SinohopeServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SinohopeServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SinohopeServiceClient" to call the correct interceptors.
func RegisterSinohopeServiceHandlerFromEndpoint ¶ added in v1.1.0
func RegisterSinohopeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSinohopeServiceHandlerFromEndpoint is same as RegisterSinohopeServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSinohopeServiceHandlerServer ¶ added in v1.1.0
func RegisterSinohopeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SinohopeServiceServer) error
RegisterSinohopeServiceHandlerServer registers the http handlers for service SinohopeService to "mux". UnaryRPC :call SinohopeServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSinohopeServiceHandlerFromEndpoint instead.
func RegisterSinohopeServiceServer ¶ added in v1.1.0
func RegisterSinohopeServiceServer(s grpc.ServiceRegistrar, srv SinohopeServiceServer)
Types ¶
type HelloServiceClient ¶
type HelloServiceClient interface {
GetHello(ctx context.Context, in *vo.HelloRequest, opts ...grpc.CallOption) (*vo.HelloResponse, error)
}
HelloServiceClient is the client API for HelloService 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 NewHelloServiceClient ¶
func NewHelloServiceClient(cc grpc.ClientConnInterface) HelloServiceClient
type HelloServiceServer ¶
type HelloServiceServer interface { GetHello(context.Context, *vo.HelloRequest) (*vo.HelloResponse, error) // contains filtered or unexported methods }
HelloServiceServer is the server API for HelloService service. All implementations must embed UnimplementedHelloServiceServer for forward compatibility
type MpcServiceClient ¶ added in v1.1.0
type MpcServiceClient interface {
MpcCheck(ctx context.Context, in *vo.MpcCheckRequest, opts ...grpc.CallOption) (*vo.MpcCheckResponse, error)
}
MpcServiceClient is the client API for MpcService 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 NewMpcServiceClient ¶ added in v1.1.0
func NewMpcServiceClient(cc grpc.ClientConnInterface) MpcServiceClient
type MpcServiceServer ¶ added in v1.1.0
type MpcServiceServer interface { MpcCheck(context.Context, *vo.MpcCheckRequest) (*vo.MpcCheckResponse, error) // contains filtered or unexported methods }
MpcServiceServer is the server API for MpcService service. All implementations must embed UnimplementedMpcServiceServer for forward compatibility
type SinohopeServiceClient ¶ added in v1.1.0
type SinohopeServiceClient interface { TransactionNotify(ctx context.Context, in *vo.TransactionNotifyRequest, opts ...grpc.CallOption) (*vo.TransactionNotifyResponse, error) WithdrawalConfirm(ctx context.Context, in *vo.WithdrawalConfirmRequest, opts ...grpc.CallOption) (*vo.WithdrawalConfirmResponse, error) }
SinohopeServiceClient is the client API for SinohopeService 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 NewSinohopeServiceClient ¶ added in v1.1.0
func NewSinohopeServiceClient(cc grpc.ClientConnInterface) SinohopeServiceClient
type SinohopeServiceServer ¶ added in v1.1.0
type SinohopeServiceServer interface { TransactionNotify(context.Context, *vo.TransactionNotifyRequest) (*vo.TransactionNotifyResponse, error) WithdrawalConfirm(context.Context, *vo.WithdrawalConfirmRequest) (*vo.WithdrawalConfirmResponse, error) // contains filtered or unexported methods }
SinohopeServiceServer is the server API for SinohopeService service. All implementations must embed UnimplementedSinohopeServiceServer for forward compatibility
type UnimplementedHelloServiceServer ¶
type UnimplementedHelloServiceServer struct { }
UnimplementedHelloServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedHelloServiceServer) GetHello ¶
func (UnimplementedHelloServiceServer) GetHello(context.Context, *vo.HelloRequest) (*vo.HelloResponse, error)
type UnimplementedMpcServiceServer ¶ added in v1.1.0
type UnimplementedMpcServiceServer struct { }
UnimplementedMpcServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedMpcServiceServer) MpcCheck ¶ added in v1.1.0
func (UnimplementedMpcServiceServer) MpcCheck(context.Context, *vo.MpcCheckRequest) (*vo.MpcCheckResponse, error)
type UnimplementedSinohopeServiceServer ¶ added in v1.1.0
type UnimplementedSinohopeServiceServer struct { }
UnimplementedSinohopeServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedSinohopeServiceServer) TransactionNotify ¶ added in v1.1.0
func (UnimplementedSinohopeServiceServer) TransactionNotify(context.Context, *vo.TransactionNotifyRequest) (*vo.TransactionNotifyResponse, error)
func (UnimplementedSinohopeServiceServer) WithdrawalConfirm ¶ added in v1.1.0
func (UnimplementedSinohopeServiceServer) WithdrawalConfirm(context.Context, *vo.WithdrawalConfirmRequest) (*vo.WithdrawalConfirmResponse, error)
type UnsafeHelloServiceServer ¶
type UnsafeHelloServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHelloServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HelloServiceServer will result in compilation errors.
type UnsafeMpcServiceServer ¶ added in v1.1.0
type UnsafeMpcServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMpcServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MpcServiceServer will result in compilation errors.
type UnsafeSinohopeServiceServer ¶ added in v1.1.0
type UnsafeSinohopeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSinohopeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SinohopeServiceServer will result in compilation errors.