_package

package
v0.0.0-...-dd3bfa9 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package _package is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	PackageService_GetPackage_FullMethodName = "/package.PackageService/GetPackage"
)

Variables

View Source
var File_package_package_proto protoreflect.FileDescriptor
View Source
var PackageService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "package.PackageService",
	HandlerType: (*PackageServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPackage",
			Handler:    _PackageService_GetPackage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "package/package.proto",
}

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

Functions

func RegisterPackageServiceHandler

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

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

func RegisterPackageServiceHandlerClient

func RegisterPackageServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PackageServiceClient) error

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

func RegisterPackageServiceHandlerFromEndpoint

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

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

func RegisterPackageServiceHandlerServer

func RegisterPackageServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PackageServiceServer) error

RegisterPackageServiceHandlerServer registers the http handlers for service PackageService to "mux". UnaryRPC :call PackageServiceServer 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 RegisterPackageServiceHandlerFromEndpoint instead.

func RegisterPackageServiceServer

func RegisterPackageServiceServer(s grpc.ServiceRegistrar, srv PackageServiceServer)

Types

type GetPackageRequest

type GetPackageRequest struct {
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Id     string `protobuf:"bytes,10,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPackageRequest) Descriptor deprecated

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

Deprecated: Use GetPackageRequest.ProtoReflect.Descriptor instead.

func (*GetPackageRequest) GetId

func (x *GetPackageRequest) GetId() string

func (*GetPackageRequest) GetUserId

func (x *GetPackageRequest) GetUserId() string

func (*GetPackageRequest) ProtoMessage

func (*GetPackageRequest) ProtoMessage()

func (*GetPackageRequest) ProtoReflect

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

func (*GetPackageRequest) Reset

func (x *GetPackageRequest) Reset()

func (*GetPackageRequest) String

func (x *GetPackageRequest) String() string

type GetPackageResponse

type GetPackageResponse struct {
	Status  *base.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	Package *Package     `protobuf:"bytes,2,opt,name=package,proto3" json:"package,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPackageResponse) Descriptor deprecated

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

Deprecated: Use GetPackageResponse.ProtoReflect.Descriptor instead.

func (*GetPackageResponse) GetPackage

func (x *GetPackageResponse) GetPackage() *Package

func (*GetPackageResponse) GetStatus

func (x *GetPackageResponse) GetStatus() *base.Status

func (*GetPackageResponse) ProtoMessage

func (*GetPackageResponse) ProtoMessage()

func (*GetPackageResponse) ProtoReflect

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

func (*GetPackageResponse) Reset

func (x *GetPackageResponse) Reset()

func (*GetPackageResponse) String

func (x *GetPackageResponse) String() string

type Package

type Package struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	UserId      string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Name        string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Summary     string `protobuf:"bytes,4,opt,name=summary,proto3" json:"summary,omitempty"`
	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	Link        string `protobuf:"bytes,6,opt,name=link,proto3" json:"link,omitempty"`
	Version     string `protobuf:"bytes,7,opt,name=version,proto3" json:"version,omitempty"`
	LastUpdated string `protobuf:"bytes,8,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
	CreatedAt   string `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt   string `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	DeletedAt   string `protobuf:"bytes,11,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Package) Descriptor deprecated

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

Deprecated: Use Package.ProtoReflect.Descriptor instead.

func (*Package) GetCreatedAt

func (x *Package) GetCreatedAt() string

func (*Package) GetDeletedAt

func (x *Package) GetDeletedAt() string

func (*Package) GetDescription

func (x *Package) GetDescription() string

func (*Package) GetId

func (x *Package) GetId() string

func (*Package) GetLastUpdated

func (x *Package) GetLastUpdated() string
func (x *Package) GetLink() string

func (*Package) GetName

func (x *Package) GetName() string

func (*Package) GetSummary

func (x *Package) GetSummary() string

func (*Package) GetUpdatedAt

func (x *Package) GetUpdatedAt() string

func (*Package) GetUserId

func (x *Package) GetUserId() string

func (*Package) GetVersion

func (x *Package) GetVersion() string

func (*Package) ProtoMessage

func (*Package) ProtoMessage()

func (*Package) ProtoReflect

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

func (*Package) Reset

func (x *Package) Reset()

func (*Package) String

func (x *Package) String() string

type PackageServiceClient

type PackageServiceClient interface {
	GetPackage(ctx context.Context, in *GetPackageRequest, opts ...grpc.CallOption) (*GetPackageResponse, error)
}

PackageServiceClient is the client API for PackageService 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 PackageServiceServer

type PackageServiceServer interface {
	GetPackage(context.Context, *GetPackageRequest) (*GetPackageResponse, error)
	// contains filtered or unexported methods
}

PackageServiceServer is the server API for PackageService service. All implementations must embed UnimplementedPackageServiceServer for forward compatibility

type UnimplementedPackageServiceServer

type UnimplementedPackageServiceServer struct {
}

UnimplementedPackageServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedPackageServiceServer) GetPackage

type UnsafePackageServiceServer

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

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

Jump to

Keyboard shortcuts

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