internalv1

package
v0.0.0-...-b4821ab Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package internalv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	InternalService_NewUser_FullMethodName = "/dolgovnya.internal.v1.InternalService/NewUser"
)

Variables

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var File_dolgovnya_internal_v1_internal_proto protoreflect.FileDescriptor
View Source
var InternalService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dolgovnya.internal.v1.InternalService",
	HandlerType: (*InternalServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NewUser",
			Handler:    _InternalService_NewUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "dolgovnya/internal/v1/internal.proto",
}

InternalService_ServiceDesc is the grpc.ServiceDesc for InternalService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterInternalServiceHandler

func RegisterInternalServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterInternalServiceHandler registers the http handlers for service InternalService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterInternalServiceHandlerClient

func RegisterInternalServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InternalServiceClient) error

RegisterInternalServiceHandlerClient registers the http handlers for service InternalService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InternalServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InternalServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "InternalServiceClient" to call the correct interceptors.

func RegisterInternalServiceHandlerFromEndpoint

func RegisterInternalServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterInternalServiceHandlerFromEndpoint is same as RegisterInternalServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterInternalServiceHandlerServer

func RegisterInternalServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InternalServiceServer) error

RegisterInternalServiceHandlerServer registers the http handlers for service InternalService to "mux". UnaryRPC :call InternalServiceServer 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 RegisterInternalServiceHandlerFromEndpoint instead.

func RegisterInternalServiceServer

func RegisterInternalServiceServer(s grpc.ServiceRegistrar, srv InternalServiceServer)

Types

type InternalServiceClient

type InternalServiceClient interface {
	NewUser(ctx context.Context, in *NewUserRequest, opts ...grpc.CallOption) (*NewUserResponse, error)
}

InternalServiceClient is the client API for InternalService 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 InternalServiceServer

type InternalServiceServer interface {
	NewUser(context.Context, *NewUserRequest) (*NewUserResponse, error)
	// contains filtered or unexported methods
}

InternalServiceServer is the server API for InternalService service. All implementations must embed UnimplementedInternalServiceServer for forward compatibility

type NewUserRequest

type NewUserRequest struct {
	// contains filtered or unexported fields
}

func (*NewUserRequest) Descriptor deprecated

func (*NewUserRequest) Descriptor() ([]byte, []int)

Deprecated: Use NewUserRequest.ProtoReflect.Descriptor instead.

func (*NewUserRequest) MarshalToSizedBufferVT

func (m *NewUserRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*NewUserRequest) MarshalToVT

func (m *NewUserRequest) MarshalToVT(dAtA []byte) (int, error)

func (*NewUserRequest) MarshalVT

func (m *NewUserRequest) MarshalVT() (dAtA []byte, err error)

func (*NewUserRequest) ProtoMessage

func (*NewUserRequest) ProtoMessage()

func (*NewUserRequest) ProtoReflect

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

func (*NewUserRequest) Reset

func (x *NewUserRequest) Reset()

func (*NewUserRequest) SizeVT

func (m *NewUserRequest) SizeVT() (n int)

func (*NewUserRequest) String

func (x *NewUserRequest) String() string

func (*NewUserRequest) UnmarshalVT

func (m *NewUserRequest) UnmarshalVT(dAtA []byte) error

type NewUserResponse

type NewUserResponse struct {
	Id int64 `protobuf:"zigzag64,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*NewUserResponse) Descriptor deprecated

func (*NewUserResponse) Descriptor() ([]byte, []int)

Deprecated: Use NewUserResponse.ProtoReflect.Descriptor instead.

func (*NewUserResponse) GetId

func (x *NewUserResponse) GetId() int64

func (*NewUserResponse) MarshalToSizedBufferVT

func (m *NewUserResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*NewUserResponse) MarshalToVT

func (m *NewUserResponse) MarshalToVT(dAtA []byte) (int, error)

func (*NewUserResponse) MarshalVT

func (m *NewUserResponse) MarshalVT() (dAtA []byte, err error)

func (*NewUserResponse) ProtoMessage

func (*NewUserResponse) ProtoMessage()

func (*NewUserResponse) ProtoReflect

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

func (*NewUserResponse) Reset

func (x *NewUserResponse) Reset()

func (*NewUserResponse) SizeVT

func (m *NewUserResponse) SizeVT() (n int)

func (*NewUserResponse) String

func (x *NewUserResponse) String() string

func (*NewUserResponse) UnmarshalVT

func (m *NewUserResponse) UnmarshalVT(dAtA []byte) error

type UnimplementedInternalServiceServer

type UnimplementedInternalServiceServer struct {
}

UnimplementedInternalServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedInternalServiceServer) NewUser

type UnsafeInternalServiceServer

type UnsafeInternalServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeInternalServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InternalServiceServer will result in compilation errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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