blobs

package
v0.3.42 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 29 Imported by: 1

Documentation

Overview

Package blobs is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	BlobsManager_GetCasBlob_FullMethodName    = "/prodvana.blobs.BlobsManager/GetCasBlob"
	BlobsManager_UploadCasBlob_FullMethodName = "/prodvana.blobs.BlobsManager/UploadCasBlob"
)

Variables

View Source
var BlobsManager_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "prodvana.blobs.BlobsManager",
	HandlerType: (*BlobsManagerServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetCasBlob",
			Handler:       _BlobsManager_GetCasBlob_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "UploadCasBlob",
			Handler:       _BlobsManager_UploadCasBlob_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "prodvana/blobs/blobs_manager.proto",
}

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

View Source
var File_prodvana_blobs_blobs_manager_proto protoreflect.FileDescriptor

Functions

func RegisterBlobsManagerHandler

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

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

func RegisterBlobsManagerHandlerClient

func RegisterBlobsManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlobsManagerClient) error

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

func RegisterBlobsManagerHandlerFromEndpoint

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

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

func RegisterBlobsManagerHandlerServer

func RegisterBlobsManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlobsManagerServer) error

RegisterBlobsManagerHandlerServer registers the http handlers for service BlobsManager to "mux". UnaryRPC :call BlobsManagerServer 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 RegisterBlobsManagerHandlerFromEndpoint instead.

func RegisterBlobsManagerServer

func RegisterBlobsManagerServer(s grpc.ServiceRegistrar, srv BlobsManagerServer)

Types

type BlobsManagerClient

type BlobsManagerClient interface {
	GetCasBlob(ctx context.Context, in *GetCasBlobReq, opts ...grpc.CallOption) (BlobsManager_GetCasBlobClient, error)
	UploadCasBlob(ctx context.Context, opts ...grpc.CallOption) (BlobsManager_UploadCasBlobClient, error)
}

BlobsManagerClient is the client API for BlobsManager 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 BlobsManagerServer

type BlobsManagerServer interface {
	GetCasBlob(*GetCasBlobReq, BlobsManager_GetCasBlobServer) error
	UploadCasBlob(BlobsManager_UploadCasBlobServer) error
	// contains filtered or unexported methods
}

BlobsManagerServer is the server API for BlobsManager service. All implementations must embed UnimplementedBlobsManagerServer for forward compatibility

type BlobsManager_GetCasBlobClient

type BlobsManager_GetCasBlobClient interface {
	Recv() (*GetCasBlobResp, error)
	grpc.ClientStream
}

type BlobsManager_GetCasBlobServer

type BlobsManager_GetCasBlobServer interface {
	Send(*GetCasBlobResp) error
	grpc.ServerStream
}

type BlobsManager_UploadCasBlobClient added in v0.2.4

type BlobsManager_UploadCasBlobClient interface {
	Send(*UploadCasBlobReq) error
	CloseAndRecv() (*UploadCasBlobResp, error)
	grpc.ClientStream
}

type BlobsManager_UploadCasBlobServer added in v0.2.4

type BlobsManager_UploadCasBlobServer interface {
	SendAndClose(*UploadCasBlobResp) error
	Recv() (*UploadCasBlobReq, error)
	grpc.ServerStream
}

type GetCasBlobReq

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

func (*GetCasBlobReq) Descriptor deprecated

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

Deprecated: Use GetCasBlobReq.ProtoReflect.Descriptor instead.

func (*GetCasBlobReq) GetId

func (x *GetCasBlobReq) GetId() string

func (*GetCasBlobReq) ProtoMessage

func (*GetCasBlobReq) ProtoMessage()

func (*GetCasBlobReq) ProtoReflect

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

func (*GetCasBlobReq) Reset

func (x *GetCasBlobReq) Reset()

func (*GetCasBlobReq) String

func (x *GetCasBlobReq) String() string

func (*GetCasBlobReq) Validate

func (m *GetCasBlobReq) Validate() error

Validate checks the field values on GetCasBlobReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetCasBlobReq) ValidateAll

func (m *GetCasBlobReq) ValidateAll() error

ValidateAll checks the field values on GetCasBlobReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetCasBlobReqMultiError, or nil if none found.

type GetCasBlobReqMultiError

type GetCasBlobReqMultiError []error

GetCasBlobReqMultiError is an error wrapping multiple validation errors returned by GetCasBlobReq.ValidateAll() if the designated constraints aren't met.

func (GetCasBlobReqMultiError) AllErrors

func (m GetCasBlobReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetCasBlobReqMultiError) Error

func (m GetCasBlobReqMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type GetCasBlobReqValidationError

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

GetCasBlobReqValidationError is the validation error returned by GetCasBlobReq.Validate if the designated constraints aren't met.

func (GetCasBlobReqValidationError) Cause

Cause function returns cause value.

func (GetCasBlobReqValidationError) Error

Error satisfies the builtin error interface

func (GetCasBlobReqValidationError) ErrorName

func (e GetCasBlobReqValidationError) ErrorName() string

ErrorName returns error name.

func (GetCasBlobReqValidationError) Field

Field function returns field value.

func (GetCasBlobReqValidationError) Key

Key function returns key value.

func (GetCasBlobReqValidationError) Reason

Reason function returns reason value.

type GetCasBlobResp

type GetCasBlobResp struct {
	Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCasBlobResp) Descriptor deprecated

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

Deprecated: Use GetCasBlobResp.ProtoReflect.Descriptor instead.

func (*GetCasBlobResp) GetBytes

func (x *GetCasBlobResp) GetBytes() []byte

func (*GetCasBlobResp) ProtoMessage

func (*GetCasBlobResp) ProtoMessage()

func (*GetCasBlobResp) ProtoReflect

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

func (*GetCasBlobResp) Reset

func (x *GetCasBlobResp) Reset()

func (*GetCasBlobResp) String

func (x *GetCasBlobResp) String() string

func (*GetCasBlobResp) Validate

func (m *GetCasBlobResp) Validate() error

Validate checks the field values on GetCasBlobResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetCasBlobResp) ValidateAll

func (m *GetCasBlobResp) ValidateAll() error

ValidateAll checks the field values on GetCasBlobResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetCasBlobRespMultiError, or nil if none found.

type GetCasBlobRespMultiError

type GetCasBlobRespMultiError []error

GetCasBlobRespMultiError is an error wrapping multiple validation errors returned by GetCasBlobResp.ValidateAll() if the designated constraints aren't met.

func (GetCasBlobRespMultiError) AllErrors

func (m GetCasBlobRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetCasBlobRespMultiError) Error

func (m GetCasBlobRespMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type GetCasBlobRespValidationError

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

GetCasBlobRespValidationError is the validation error returned by GetCasBlobResp.Validate if the designated constraints aren't met.

func (GetCasBlobRespValidationError) Cause

Cause function returns cause value.

func (GetCasBlobRespValidationError) Error

Error satisfies the builtin error interface

func (GetCasBlobRespValidationError) ErrorName

func (e GetCasBlobRespValidationError) ErrorName() string

ErrorName returns error name.

func (GetCasBlobRespValidationError) Field

Field function returns field value.

func (GetCasBlobRespValidationError) Key

Key function returns key value.

func (GetCasBlobRespValidationError) Reason

Reason function returns reason value.

type UnimplementedBlobsManagerServer

type UnimplementedBlobsManagerServer struct {
}

UnimplementedBlobsManagerServer must be embedded to have forward compatible implementations.

func (UnimplementedBlobsManagerServer) GetCasBlob

func (UnimplementedBlobsManagerServer) UploadCasBlob added in v0.2.4

type UnsafeBlobsManagerServer

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

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

type UploadCasBlobReq added in v0.2.4

type UploadCasBlobReq struct {
	Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"`
	// contains filtered or unexported fields
}

func (*UploadCasBlobReq) Descriptor deprecated added in v0.2.4

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

Deprecated: Use UploadCasBlobReq.ProtoReflect.Descriptor instead.

func (*UploadCasBlobReq) GetBytes added in v0.2.4

func (x *UploadCasBlobReq) GetBytes() []byte

func (*UploadCasBlobReq) ProtoMessage added in v0.2.4

func (*UploadCasBlobReq) ProtoMessage()

func (*UploadCasBlobReq) ProtoReflect added in v0.2.4

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

func (*UploadCasBlobReq) Reset added in v0.2.4

func (x *UploadCasBlobReq) Reset()

func (*UploadCasBlobReq) String added in v0.2.4

func (x *UploadCasBlobReq) String() string

func (*UploadCasBlobReq) Validate added in v0.2.4

func (m *UploadCasBlobReq) Validate() error

Validate checks the field values on UploadCasBlobReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UploadCasBlobReq) ValidateAll added in v0.2.4

func (m *UploadCasBlobReq) ValidateAll() error

ValidateAll checks the field values on UploadCasBlobReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UploadCasBlobReqMultiError, or nil if none found.

type UploadCasBlobReqMultiError added in v0.2.4

type UploadCasBlobReqMultiError []error

UploadCasBlobReqMultiError is an error wrapping multiple validation errors returned by UploadCasBlobReq.ValidateAll() if the designated constraints aren't met.

func (UploadCasBlobReqMultiError) AllErrors added in v0.2.4

func (m UploadCasBlobReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UploadCasBlobReqMultiError) Error added in v0.2.4

Error returns a concatenation of all the error messages it wraps.

type UploadCasBlobReqValidationError added in v0.2.4

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

UploadCasBlobReqValidationError is the validation error returned by UploadCasBlobReq.Validate if the designated constraints aren't met.

func (UploadCasBlobReqValidationError) Cause added in v0.2.4

Cause function returns cause value.

func (UploadCasBlobReqValidationError) Error added in v0.2.4

Error satisfies the builtin error interface

func (UploadCasBlobReqValidationError) ErrorName added in v0.2.4

ErrorName returns error name.

func (UploadCasBlobReqValidationError) Field added in v0.2.4

Field function returns field value.

func (UploadCasBlobReqValidationError) Key added in v0.2.4

Key function returns key value.

func (UploadCasBlobReqValidationError) Reason added in v0.2.4

Reason function returns reason value.

type UploadCasBlobResp added in v0.2.4

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

func (*UploadCasBlobResp) Descriptor deprecated added in v0.2.4

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

Deprecated: Use UploadCasBlobResp.ProtoReflect.Descriptor instead.

func (*UploadCasBlobResp) GetId added in v0.2.4

func (x *UploadCasBlobResp) GetId() string

func (*UploadCasBlobResp) ProtoMessage added in v0.2.4

func (*UploadCasBlobResp) ProtoMessage()

func (*UploadCasBlobResp) ProtoReflect added in v0.2.4

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

func (*UploadCasBlobResp) Reset added in v0.2.4

func (x *UploadCasBlobResp) Reset()

func (*UploadCasBlobResp) String added in v0.2.4

func (x *UploadCasBlobResp) String() string

func (*UploadCasBlobResp) Validate added in v0.2.4

func (m *UploadCasBlobResp) Validate() error

Validate checks the field values on UploadCasBlobResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UploadCasBlobResp) ValidateAll added in v0.2.4

func (m *UploadCasBlobResp) ValidateAll() error

ValidateAll checks the field values on UploadCasBlobResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UploadCasBlobRespMultiError, or nil if none found.

type UploadCasBlobRespMultiError added in v0.2.4

type UploadCasBlobRespMultiError []error

UploadCasBlobRespMultiError is an error wrapping multiple validation errors returned by UploadCasBlobResp.ValidateAll() if the designated constraints aren't met.

func (UploadCasBlobRespMultiError) AllErrors added in v0.2.4

func (m UploadCasBlobRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UploadCasBlobRespMultiError) Error added in v0.2.4

Error returns a concatenation of all the error messages it wraps.

type UploadCasBlobRespValidationError added in v0.2.4

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

UploadCasBlobRespValidationError is the validation error returned by UploadCasBlobResp.Validate if the designated constraints aren't met.

func (UploadCasBlobRespValidationError) Cause added in v0.2.4

Cause function returns cause value.

func (UploadCasBlobRespValidationError) Error added in v0.2.4

Error satisfies the builtin error interface

func (UploadCasBlobRespValidationError) ErrorName added in v0.2.4

ErrorName returns error name.

func (UploadCasBlobRespValidationError) Field added in v0.2.4

Field function returns field value.

func (UploadCasBlobRespValidationError) Key added in v0.2.4

Key function returns key value.

func (UploadCasBlobRespValidationError) Reason added in v0.2.4

Reason function returns reason value.

Jump to

Keyboard shortcuts

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