Documentation ¶
Overview ¶
Package postv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterOperatorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterOperatorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OperatorServiceClient) error
- func RegisterOperatorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterOperatorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OperatorServiceServer) error
- func RegisterOperatorServiceServer(s grpc.ServiceRegistrar, srv OperatorServiceServer)
- type OperatorServiceClient
- type OperatorServiceServer
- type OperatorStatusRequest
- type OperatorStatusResponse
- func (*OperatorStatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *OperatorStatusResponse) GetStatus() OperatorStatusResponse_Status
- func (*OperatorStatusResponse) ProtoMessage()
- func (x *OperatorStatusResponse) ProtoReflect() protoreflect.Message
- func (x *OperatorStatusResponse) Reset()
- func (x *OperatorStatusResponse) String() string
- type OperatorStatusResponse_Status
- func (OperatorStatusResponse_Status) Descriptor() protoreflect.EnumDescriptor
- func (x OperatorStatusResponse_Status) Enum() *OperatorStatusResponse_Status
- func (OperatorStatusResponse_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x OperatorStatusResponse_Status) Number() protoreflect.EnumNumber
- func (x OperatorStatusResponse_Status) String() string
- func (OperatorStatusResponse_Status) Type() protoreflect.EnumType
- type UnimplementedOperatorServiceServer
- type UnsafeOperatorServiceServer
Constants ¶
const (
OperatorService_Status_FullMethodName = "/post.v1.OperatorService/Status"
)
Variables ¶
var ( OperatorStatusResponse_Status_name = map[int32]string{ 0: "_UNUSED", 1: "IDLE", 2: "PROVING", } OperatorStatusResponse_Status_value = map[string]int32{ "_UNUSED": 0, "IDLE": 1, "PROVING": 2, } )
Enum value maps for OperatorStatusResponse_Status.
var File_post_v1_service_proto protoreflect.FileDescriptor
var OperatorService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "post.v1.OperatorService", HandlerType: (*OperatorServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Status", Handler: _OperatorService_Status_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "post/v1/service.proto", }
OperatorService_ServiceDesc is the grpc.ServiceDesc for OperatorService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOperatorServiceHandler ¶
func RegisterOperatorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterOperatorServiceHandler registers the http handlers for service OperatorService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterOperatorServiceHandlerClient ¶
func RegisterOperatorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OperatorServiceClient) error
RegisterOperatorServiceHandlerClient registers the http handlers for service OperatorService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OperatorServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OperatorServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "OperatorServiceClient" to call the correct interceptors.
func RegisterOperatorServiceHandlerFromEndpoint ¶
func RegisterOperatorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterOperatorServiceHandlerFromEndpoint is same as RegisterOperatorServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterOperatorServiceHandlerServer ¶
func RegisterOperatorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OperatorServiceServer) error
RegisterOperatorServiceHandlerServer registers the http handlers for service OperatorService to "mux". UnaryRPC :call OperatorServiceServer 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 RegisterOperatorServiceHandlerFromEndpoint instead.
func RegisterOperatorServiceServer ¶
func RegisterOperatorServiceServer(s grpc.ServiceRegistrar, srv OperatorServiceServer)
Types ¶
type OperatorServiceClient ¶
type OperatorServiceClient interface {
Status(ctx context.Context, in *OperatorStatusRequest, opts ...grpc.CallOption) (*OperatorStatusResponse, error)
}
OperatorServiceClient is the client API for OperatorService 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 NewOperatorServiceClient ¶
func NewOperatorServiceClient(cc grpc.ClientConnInterface) OperatorServiceClient
type OperatorServiceServer ¶
type OperatorServiceServer interface {
Status(context.Context, *OperatorStatusRequest) (*OperatorStatusResponse, error)
}
OperatorServiceServer is the server API for OperatorService service. All implementations should embed UnimplementedOperatorServiceServer for forward compatibility
type OperatorStatusRequest ¶
type OperatorStatusRequest struct {
// contains filtered or unexported fields
}
func (*OperatorStatusRequest) Descriptor
deprecated
func (*OperatorStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use OperatorStatusRequest.ProtoReflect.Descriptor instead.
func (*OperatorStatusRequest) ProtoMessage ¶
func (*OperatorStatusRequest) ProtoMessage()
func (*OperatorStatusRequest) ProtoReflect ¶
func (x *OperatorStatusRequest) ProtoReflect() protoreflect.Message
func (*OperatorStatusRequest) Reset ¶
func (x *OperatorStatusRequest) Reset()
func (*OperatorStatusRequest) String ¶
func (x *OperatorStatusRequest) String() string
type OperatorStatusResponse ¶
type OperatorStatusResponse struct { Status OperatorStatusResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=post.v1.OperatorStatusResponse_Status" json:"status,omitempty"` // contains filtered or unexported fields }
func (*OperatorStatusResponse) Descriptor
deprecated
func (*OperatorStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use OperatorStatusResponse.ProtoReflect.Descriptor instead.
func (*OperatorStatusResponse) GetStatus ¶
func (x *OperatorStatusResponse) GetStatus() OperatorStatusResponse_Status
func (*OperatorStatusResponse) ProtoMessage ¶
func (*OperatorStatusResponse) ProtoMessage()
func (*OperatorStatusResponse) ProtoReflect ¶
func (x *OperatorStatusResponse) ProtoReflect() protoreflect.Message
func (*OperatorStatusResponse) Reset ¶
func (x *OperatorStatusResponse) Reset()
func (*OperatorStatusResponse) String ¶
func (x *OperatorStatusResponse) String() string
type OperatorStatusResponse_Status ¶
type OperatorStatusResponse_Status int32
const ( OperatorStatusResponse__UNUSED OperatorStatusResponse_Status = 0 OperatorStatusResponse_IDLE OperatorStatusResponse_Status = 1 OperatorStatusResponse_PROVING OperatorStatusResponse_Status = 2 )
func (OperatorStatusResponse_Status) Descriptor ¶
func (OperatorStatusResponse_Status) Descriptor() protoreflect.EnumDescriptor
func (OperatorStatusResponse_Status) Enum ¶
func (x OperatorStatusResponse_Status) Enum() *OperatorStatusResponse_Status
func (OperatorStatusResponse_Status) EnumDescriptor
deprecated
func (OperatorStatusResponse_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use OperatorStatusResponse_Status.Descriptor instead.
func (OperatorStatusResponse_Status) Number ¶
func (x OperatorStatusResponse_Status) Number() protoreflect.EnumNumber
func (OperatorStatusResponse_Status) String ¶
func (x OperatorStatusResponse_Status) String() string
func (OperatorStatusResponse_Status) Type ¶
func (OperatorStatusResponse_Status) Type() protoreflect.EnumType
type UnimplementedOperatorServiceServer ¶
type UnimplementedOperatorServiceServer struct { }
UnimplementedOperatorServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedOperatorServiceServer) Status ¶
func (UnimplementedOperatorServiceServer) Status(context.Context, *OperatorStatusRequest) (*OperatorStatusResponse, error)
type UnsafeOperatorServiceServer ¶
type UnsafeOperatorServiceServer interface {
// contains filtered or unexported methods
}
UnsafeOperatorServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OperatorServiceServer will result in compilation errors.