Documentation ¶
Overview ¶
Package protos is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterInternalRoutesHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterInternalRoutesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InternalRoutesClient) error
- func RegisterInternalRoutesHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterInternalRoutesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InternalRoutesServer) error
- func RegisterInternalRoutesServer(s grpc.ServiceRegistrar, srv InternalRoutesServer)
- type BodyStruct
- func (*BodyStruct) Descriptor() ([]byte, []int)deprecated
- func (x *BodyStruct) GetData() *anypb.Any
- func (x *BodyStruct) GetError() *InternalErr
- func (x *BodyStruct) GetMessage() string
- func (x *BodyStruct) GetStatus() string
- func (x *BodyStruct) GetStatusCode() int32
- func (*BodyStruct) ProtoMessage()
- func (x *BodyStruct) ProtoReflect() protoreflect.Message
- func (x *BodyStruct) Reset()
- func (x *BodyStruct) String() string
- type HealthResponse
- func (*HealthResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HealthResponse) GetMessage() string
- func (x *HealthResponse) GetStatus() string
- func (x *HealthResponse) GetStatusCode() int32
- func (*HealthResponse) ProtoMessage()
- func (x *HealthResponse) ProtoReflect() protoreflect.Message
- func (x *HealthResponse) Reset()
- func (x *HealthResponse) String() string
- type InternalErr
- func (*InternalErr) Descriptor() ([]byte, []int)deprecated
- func (x *InternalErr) GetCode() int32
- func (x *InternalErr) GetError() *anypb.Any
- func (x *InternalErr) GetField() string
- func (x *InternalErr) GetMessage() string
- func (x *InternalErr) GetStackTrace() []string
- func (x *InternalErr) GetTraceId() string
- func (x *InternalErr) GetType() string
- func (x *InternalErr) GetValue() string
- func (*InternalErr) ProtoMessage()
- func (x *InternalErr) ProtoReflect() protoreflect.Message
- func (x *InternalErr) Reset()
- func (x *InternalErr) String() string
- type InternalRoutesClient
- type InternalRoutesServer
- type UnimplementedInternalRoutesServer
- type UnsafeInternalRoutesServer
- type VersionResponse
- func (*VersionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VersionResponse) GetMessage() string
- func (x *VersionResponse) GetStatus() string
- func (x *VersionResponse) GetStatusCode() int32
- func (*VersionResponse) ProtoMessage()
- func (x *VersionResponse) ProtoReflect() protoreflect.Message
- func (x *VersionResponse) Reset()
- func (x *VersionResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var File_internal_proto protoreflect.FileDescriptor
var File_response_proto protoreflect.FileDescriptor
var InternalRoutes_ServiceDesc = grpc.ServiceDesc{ ServiceName: "InternalRoutes", HandlerType: (*InternalRoutesServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Health", Handler: _InternalRoutes_Health_Handler, }, { MethodName: "Version", Handler: _InternalRoutes_Version_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "internal.proto", }
InternalRoutes_ServiceDesc is the grpc.ServiceDesc for InternalRoutes service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterInternalRoutesHandler ¶ added in v0.0.1
func RegisterInternalRoutesHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterInternalRoutesHandler registers the http handlers for service InternalRoutes to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterInternalRoutesHandlerClient ¶ added in v0.0.1
func RegisterInternalRoutesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InternalRoutesClient) error
RegisterInternalRoutesHandlerClient registers the http handlers for service InternalRoutes to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InternalRoutesClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InternalRoutesClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "InternalRoutesClient" to call the correct interceptors.
func RegisterInternalRoutesHandlerFromEndpoint ¶ added in v0.0.1
func RegisterInternalRoutesHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterInternalRoutesHandlerFromEndpoint is same as RegisterInternalRoutesHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterInternalRoutesHandlerServer ¶ added in v0.0.1
func RegisterInternalRoutesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InternalRoutesServer) error
RegisterInternalRoutesHandlerServer registers the http handlers for service InternalRoutes to "mux". UnaryRPC :call InternalRoutesServer 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 RegisterInternalRoutesHandlerFromEndpoint instead.
func RegisterInternalRoutesServer ¶ added in v0.0.1
func RegisterInternalRoutesServer(s grpc.ServiceRegistrar, srv InternalRoutesServer)
Types ¶
type BodyStruct ¶ added in v0.0.1
type BodyStruct struct { Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` StatusCode int32 `protobuf:"varint,2,opt,name=statusCode,proto3" json:"statusCode,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` Error *InternalErr `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` Data *anypb.Any `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*BodyStruct) Descriptor
deprecated
added in
v0.0.1
func (*BodyStruct) Descriptor() ([]byte, []int)
Deprecated: Use BodyStruct.ProtoReflect.Descriptor instead.
func (*BodyStruct) GetData ¶ added in v0.0.1
func (x *BodyStruct) GetData() *anypb.Any
func (*BodyStruct) GetError ¶ added in v0.0.1
func (x *BodyStruct) GetError() *InternalErr
func (*BodyStruct) GetMessage ¶ added in v0.0.1
func (x *BodyStruct) GetMessage() string
func (*BodyStruct) GetStatus ¶ added in v0.0.1
func (x *BodyStruct) GetStatus() string
func (*BodyStruct) GetStatusCode ¶ added in v0.0.1
func (x *BodyStruct) GetStatusCode() int32
func (*BodyStruct) ProtoMessage ¶ added in v0.0.1
func (*BodyStruct) ProtoMessage()
func (*BodyStruct) ProtoReflect ¶ added in v0.0.1
func (x *BodyStruct) ProtoReflect() protoreflect.Message
func (*BodyStruct) Reset ¶ added in v0.0.1
func (x *BodyStruct) Reset()
func (*BodyStruct) String ¶ added in v0.0.1
func (x *BodyStruct) String() string
type HealthResponse ¶
type HealthResponse struct { StatusCode int32 `protobuf:"varint,1,opt,name=statusCode,proto3" json:"statusCode,omitempty"` Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*HealthResponse) Descriptor
deprecated
func (*HealthResponse) Descriptor() ([]byte, []int)
Deprecated: Use HealthResponse.ProtoReflect.Descriptor instead.
func (*HealthResponse) GetMessage ¶
func (x *HealthResponse) GetMessage() string
func (*HealthResponse) GetStatus ¶ added in v0.0.1
func (x *HealthResponse) GetStatus() string
func (*HealthResponse) GetStatusCode ¶
func (x *HealthResponse) GetStatusCode() int32
func (*HealthResponse) ProtoMessage ¶
func (*HealthResponse) ProtoMessage()
func (*HealthResponse) ProtoReflect ¶
func (x *HealthResponse) ProtoReflect() protoreflect.Message
func (*HealthResponse) Reset ¶
func (x *HealthResponse) Reset()
func (*HealthResponse) String ¶
func (x *HealthResponse) String() string
type InternalErr ¶ added in v0.0.1
type InternalErr struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Error *anypb.Any `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` TraceId string `protobuf:"bytes,4,opt,name=traceId,proto3" json:"traceId,omitempty"` Field string `protobuf:"bytes,5,opt,name=field,proto3" json:"field,omitempty"` Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"` Value string `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` StackTrace []string `protobuf:"bytes,8,rep,name=stackTrace,proto3" json:"stackTrace,omitempty"` // contains filtered or unexported fields }
func (*InternalErr) Descriptor
deprecated
added in
v0.0.1
func (*InternalErr) Descriptor() ([]byte, []int)
Deprecated: Use InternalErr.ProtoReflect.Descriptor instead.
func (*InternalErr) GetCode ¶ added in v0.0.1
func (x *InternalErr) GetCode() int32
func (*InternalErr) GetError ¶ added in v0.0.1
func (x *InternalErr) GetError() *anypb.Any
func (*InternalErr) GetField ¶ added in v0.0.1
func (x *InternalErr) GetField() string
func (*InternalErr) GetMessage ¶ added in v0.0.1
func (x *InternalErr) GetMessage() string
func (*InternalErr) GetStackTrace ¶ added in v0.0.1
func (x *InternalErr) GetStackTrace() []string
func (*InternalErr) GetTraceId ¶ added in v0.0.1
func (x *InternalErr) GetTraceId() string
func (*InternalErr) GetType ¶ added in v0.0.1
func (x *InternalErr) GetType() string
func (*InternalErr) GetValue ¶ added in v0.0.1
func (x *InternalErr) GetValue() string
func (*InternalErr) ProtoMessage ¶ added in v0.0.1
func (*InternalErr) ProtoMessage()
func (*InternalErr) ProtoReflect ¶ added in v0.0.1
func (x *InternalErr) ProtoReflect() protoreflect.Message
func (*InternalErr) Reset ¶ added in v0.0.1
func (x *InternalErr) Reset()
func (*InternalErr) String ¶ added in v0.0.1
func (x *InternalErr) String() string
type InternalRoutesClient ¶ added in v0.0.1
type InternalRoutesClient interface { Health(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthResponse, error) Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) }
InternalRoutesClient is the client API for InternalRoutes 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 NewInternalRoutesClient ¶ added in v0.0.1
func NewInternalRoutesClient(cc grpc.ClientConnInterface) InternalRoutesClient
type InternalRoutesServer ¶ added in v0.0.1
type InternalRoutesServer interface { Health(context.Context, *emptypb.Empty) (*HealthResponse, error) Version(context.Context, *emptypb.Empty) (*VersionResponse, error) // contains filtered or unexported methods }
InternalRoutesServer is the server API for InternalRoutes service. All implementations must embed UnimplementedInternalRoutesServer for forward compatibility
type UnimplementedInternalRoutesServer ¶ added in v0.0.1
type UnimplementedInternalRoutesServer struct { }
UnimplementedInternalRoutesServer must be embedded to have forward compatible implementations.
func (UnimplementedInternalRoutesServer) Health ¶ added in v0.0.1
func (UnimplementedInternalRoutesServer) Health(context.Context, *emptypb.Empty) (*HealthResponse, error)
func (UnimplementedInternalRoutesServer) Version ¶ added in v0.0.1
func (UnimplementedInternalRoutesServer) Version(context.Context, *emptypb.Empty) (*VersionResponse, error)
type UnsafeInternalRoutesServer ¶ added in v0.0.1
type UnsafeInternalRoutesServer interface {
// contains filtered or unexported methods
}
UnsafeInternalRoutesServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InternalRoutesServer will result in compilation errors.
type VersionResponse ¶
type VersionResponse struct { StatusCode int32 `protobuf:"varint,1,opt,name=statusCode,proto3" json:"statusCode,omitempty"` Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*VersionResponse) Descriptor
deprecated
func (*VersionResponse) Descriptor() ([]byte, []int)
Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead.
func (*VersionResponse) GetMessage ¶
func (x *VersionResponse) GetMessage() string
func (*VersionResponse) GetStatus ¶ added in v0.0.1
func (x *VersionResponse) GetStatus() string
func (*VersionResponse) GetStatusCode ¶
func (x *VersionResponse) GetStatusCode() int32
func (*VersionResponse) ProtoMessage ¶
func (*VersionResponse) ProtoMessage()
func (*VersionResponse) ProtoReflect ¶
func (x *VersionResponse) ProtoReflect() protoreflect.Message
func (*VersionResponse) Reset ¶
func (x *VersionResponse) Reset()
func (*VersionResponse) String ¶
func (x *VersionResponse) String() string