Documentation ¶
Overview ¶
Package ModType is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterModTypeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterModTypeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ModTypeServiceClient) error
- func RegisterModTypeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterModTypeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ModTypeServiceServer) error
- func RegisterModTypeServiceServer(s grpc.ServiceRegistrar, srv ModTypeServiceServer)
- type GetModTypeByIDRequest
- func (*GetModTypeByIDRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetModTypeByIDRequest) GetID() string
- func (*GetModTypeByIDRequest) ProtoMessage()
- func (x *GetModTypeByIDRequest) ProtoReflect() protoreflect.Message
- func (x *GetModTypeByIDRequest) Reset()
- func (x *GetModTypeByIDRequest) String() string
- type GetModTypeByIDResponse
- func (*GetModTypeByIDResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetModTypeByIDResponse) GetModType() *ModType
- func (*GetModTypeByIDResponse) ProtoMessage()
- func (x *GetModTypeByIDResponse) ProtoReflect() protoreflect.Message
- func (x *GetModTypeByIDResponse) Reset()
- func (x *GetModTypeByIDResponse) String() string
- type GetModTypesRequest
- type GetModTypesResponse
- func (*GetModTypesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetModTypesResponse) GetModTypes() []*ModType
- func (*GetModTypesResponse) ProtoMessage()
- func (x *GetModTypesResponse) ProtoReflect() protoreflect.Message
- func (x *GetModTypesResponse) Reset()
- func (x *GetModTypesResponse) String() string
- type ModType
- type ModTypeServiceClient
- type ModTypeServiceServer
- type UnimplementedModTypeServiceServer
- type UnsafeModTypeServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_modType_modType_proto protoreflect.FileDescriptor
var ModTypeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "modType_service.ModTypeService", HandlerType: (*ModTypeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetModTypeByID", Handler: _ModTypeService_GetModTypeByID_Handler, }, { MethodName: "GetModTypes", Handler: _ModTypeService_GetModTypes_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "modType/modType.proto", }
ModTypeService_ServiceDesc is the grpc.ServiceDesc for ModTypeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterModTypeServiceHandler ¶
func RegisterModTypeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterModTypeServiceHandler registers the http handlers for service ModTypeService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterModTypeServiceHandlerClient ¶
func RegisterModTypeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ModTypeServiceClient) error
RegisterModTypeServiceHandlerClient registers the http handlers for service ModTypeService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ModTypeServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ModTypeServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ModTypeServiceClient" to call the correct interceptors.
func RegisterModTypeServiceHandlerFromEndpoint ¶
func RegisterModTypeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterModTypeServiceHandlerFromEndpoint is same as RegisterModTypeServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterModTypeServiceHandlerServer ¶
func RegisterModTypeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ModTypeServiceServer) error
RegisterModTypeServiceHandlerServer registers the http handlers for service ModTypeService to "mux". UnaryRPC :call ModTypeServiceServer 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 RegisterModTypeServiceHandlerFromEndpoint instead.
func RegisterModTypeServiceServer ¶
func RegisterModTypeServiceServer(s grpc.ServiceRegistrar, srv ModTypeServiceServer)
Types ¶
type GetModTypeByIDRequest ¶
type GetModTypeByIDRequest struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` // contains filtered or unexported fields }
GetModTypeByID
func (*GetModTypeByIDRequest) Descriptor
deprecated
func (*GetModTypeByIDRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetModTypeByIDRequest.ProtoReflect.Descriptor instead.
func (*GetModTypeByIDRequest) GetID ¶
func (x *GetModTypeByIDRequest) GetID() string
func (*GetModTypeByIDRequest) ProtoMessage ¶
func (*GetModTypeByIDRequest) ProtoMessage()
func (*GetModTypeByIDRequest) ProtoReflect ¶
func (x *GetModTypeByIDRequest) ProtoReflect() protoreflect.Message
func (*GetModTypeByIDRequest) Reset ¶
func (x *GetModTypeByIDRequest) Reset()
func (*GetModTypeByIDRequest) String ¶
func (x *GetModTypeByIDRequest) String() string
type GetModTypeByIDResponse ¶
type GetModTypeByIDResponse struct { ModType *ModType `protobuf:"bytes,1,opt,name=ModType,proto3" json:"ModType,omitempty"` // contains filtered or unexported fields }
func (*GetModTypeByIDResponse) Descriptor
deprecated
func (*GetModTypeByIDResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetModTypeByIDResponse.ProtoReflect.Descriptor instead.
func (*GetModTypeByIDResponse) GetModType ¶
func (x *GetModTypeByIDResponse) GetModType() *ModType
func (*GetModTypeByIDResponse) ProtoMessage ¶
func (*GetModTypeByIDResponse) ProtoMessage()
func (*GetModTypeByIDResponse) ProtoReflect ¶
func (x *GetModTypeByIDResponse) ProtoReflect() protoreflect.Message
func (*GetModTypeByIDResponse) Reset ¶
func (x *GetModTypeByIDResponse) Reset()
func (*GetModTypeByIDResponse) String ¶
func (x *GetModTypeByIDResponse) String() string
type GetModTypesRequest ¶
type GetModTypesRequest struct {
// contains filtered or unexported fields
}
GetModTypes
func (*GetModTypesRequest) Descriptor
deprecated
func (*GetModTypesRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetModTypesRequest.ProtoReflect.Descriptor instead.
func (*GetModTypesRequest) ProtoMessage ¶
func (*GetModTypesRequest) ProtoMessage()
func (*GetModTypesRequest) ProtoReflect ¶
func (x *GetModTypesRequest) ProtoReflect() protoreflect.Message
func (*GetModTypesRequest) Reset ¶
func (x *GetModTypesRequest) Reset()
func (*GetModTypesRequest) String ¶
func (x *GetModTypesRequest) String() string
type GetModTypesResponse ¶
type GetModTypesResponse struct { ModTypes []*ModType `protobuf:"bytes,1,rep,name=ModTypes,proto3" json:"ModTypes,omitempty"` // contains filtered or unexported fields }
func (*GetModTypesResponse) Descriptor
deprecated
func (*GetModTypesResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetModTypesResponse.ProtoReflect.Descriptor instead.
func (*GetModTypesResponse) GetModTypes ¶
func (x *GetModTypesResponse) GetModTypes() []*ModType
func (*GetModTypesResponse) ProtoMessage ¶
func (*GetModTypesResponse) ProtoMessage()
func (*GetModTypesResponse) ProtoReflect ¶
func (x *GetModTypesResponse) ProtoReflect() protoreflect.Message
func (*GetModTypesResponse) Reset ¶
func (x *GetModTypesResponse) Reset()
func (*GetModTypesResponse) String ¶
func (x *GetModTypesResponse) String() string
type ModType ¶
type ModType struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` // contains filtered or unexported fields }
func (*ModType) Descriptor
deprecated
func (*ModType) ProtoMessage ¶
func (*ModType) ProtoMessage()
func (*ModType) ProtoReflect ¶
func (x *ModType) ProtoReflect() protoreflect.Message
type ModTypeServiceClient ¶
type ModTypeServiceClient interface { GetModTypeByID(ctx context.Context, in *GetModTypeByIDRequest, opts ...grpc.CallOption) (*GetModTypeByIDResponse, error) GetModTypes(ctx context.Context, in *GetModTypesRequest, opts ...grpc.CallOption) (*GetModTypesResponse, error) }
ModTypeServiceClient is the client API for ModTypeService 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 NewModTypeServiceClient ¶
func NewModTypeServiceClient(cc grpc.ClientConnInterface) ModTypeServiceClient
type ModTypeServiceServer ¶
type ModTypeServiceServer interface { GetModTypeByID(context.Context, *GetModTypeByIDRequest) (*GetModTypeByIDResponse, error) GetModTypes(context.Context, *GetModTypesRequest) (*GetModTypesResponse, error) // contains filtered or unexported methods }
ModTypeServiceServer is the server API for ModTypeService service. All implementations must embed UnimplementedModTypeServiceServer for forward compatibility
type UnimplementedModTypeServiceServer ¶
type UnimplementedModTypeServiceServer struct { }
UnimplementedModTypeServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedModTypeServiceServer) GetModTypeByID ¶
func (UnimplementedModTypeServiceServer) GetModTypeByID(context.Context, *GetModTypeByIDRequest) (*GetModTypeByIDResponse, error)
func (UnimplementedModTypeServiceServer) GetModTypes ¶
func (UnimplementedModTypeServiceServer) GetModTypes(context.Context, *GetModTypesRequest) (*GetModTypesResponse, error)
type UnsafeModTypeServiceServer ¶
type UnsafeModTypeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeModTypeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ModTypeServiceServer will result in compilation errors.