ModType

package
v0.0.0-...-ceaf5e3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2023 License: MIT Imports: 15 Imported by: 4

Documentation

Overview

Package ModType is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_modType_modType_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use ModType.ProtoReflect.Descriptor instead.

func (*ModType) GetID

func (x *ModType) GetID() string

func (*ModType) GetName

func (x *ModType) GetName() string

func (*ModType) ProtoMessage

func (*ModType) ProtoMessage()

func (*ModType) ProtoReflect

func (x *ModType) ProtoReflect() protoreflect.Message

func (*ModType) Reset

func (x *ModType) Reset()

func (*ModType) String

func (x *ModType) String() string

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.

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) GetModTypes

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL