mediabase_v1

package
v0.0.0-...-fea30cf Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package mediabase_v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	MediabaseService_Ping_FullMethodName            = "/v1.MediabaseService/Ping"
	MediabaseService_PresignUpload_FullMethodName   = "/v1.MediabaseService/PresignUpload"
	MediabaseService_PresignDownload_FullMethodName = "/v1.MediabaseService/PresignDownload"
	MediabaseService_DeleteObject_FullMethodName    = "/v1.MediabaseService/DeleteObject"
	MediabaseService_CreateBucket_FullMethodName    = "/v1.MediabaseService/CreateBucket"
)

Variables

View Source
var File_proto_mediabase_v1_mediabase_proto protoreflect.FileDescriptor
View Source
var File_proto_mediabase_v1_ping_proto protoreflect.FileDescriptor
View Source
var MediabaseService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1.MediabaseService",
	HandlerType: (*MediabaseServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _MediabaseService_Ping_Handler,
		},
		{
			MethodName: "PresignUpload",
			Handler:    _MediabaseService_PresignUpload_Handler,
		},
		{
			MethodName: "PresignDownload",
			Handler:    _MediabaseService_PresignDownload_Handler,
		},
		{
			MethodName: "DeleteObject",
			Handler:    _MediabaseService_DeleteObject_Handler,
		},
		{
			MethodName: "CreateBucket",
			Handler:    _MediabaseService_CreateBucket_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/mediabase/v1/mediabase.proto",
}

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

Functions

func RegisterMediabaseServiceHandler

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

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

func RegisterMediabaseServiceHandlerClient

func RegisterMediabaseServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MediabaseServiceClient) error

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

func RegisterMediabaseServiceHandlerFromEndpoint

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

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

func RegisterMediabaseServiceHandlerServer

func RegisterMediabaseServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MediabaseServiceServer) error

RegisterMediabaseServiceHandlerServer registers the http handlers for service MediabaseService to "mux". UnaryRPC :call MediabaseServiceServer 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 RegisterMediabaseServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

func RegisterMediabaseServiceServer

func RegisterMediabaseServiceServer(s grpc.ServiceRegistrar, srv MediabaseServiceServer)

Types

type CreateBucketRequest

type CreateBucketRequest struct {
	BucketName string `protobuf:"bytes,1,opt,name=bucket_name,json=bucketName,proto3" json:"bucket_name,omitempty"`
	IsPublic   bool   `protobuf:"varint,2,opt,name=is_public,json=isPublic,proto3" json:"is_public,omitempty"`
	// contains filtered or unexported fields
}

CreateBucketRequest contains the bucket name and public access preference

func (*CreateBucketRequest) Descriptor deprecated

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

Deprecated: Use CreateBucketRequest.ProtoReflect.Descriptor instead.

func (*CreateBucketRequest) GetBucketName

func (x *CreateBucketRequest) GetBucketName() string

func (*CreateBucketRequest) GetIsPublic

func (x *CreateBucketRequest) GetIsPublic() bool

func (*CreateBucketRequest) ProtoMessage

func (*CreateBucketRequest) ProtoMessage()

func (*CreateBucketRequest) ProtoReflect

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

func (*CreateBucketRequest) Reset

func (x *CreateBucketRequest) Reset()

func (*CreateBucketRequest) String

func (x *CreateBucketRequest) String() string

func (*CreateBucketRequest) Validate

func (m *CreateBucketRequest) Validate() error

Validate checks the field values on CreateBucketRequest 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 (*CreateBucketRequest) ValidateAll

func (m *CreateBucketRequest) ValidateAll() error

ValidateAll checks the field values on CreateBucketRequest 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 CreateBucketRequestMultiError, or nil if none found.

type CreateBucketRequestMultiError

type CreateBucketRequestMultiError []error

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

func (CreateBucketRequestMultiError) AllErrors

func (m CreateBucketRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateBucketRequestMultiError) Error

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

type CreateBucketRequestValidationError

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

CreateBucketRequestValidationError is the validation error returned by CreateBucketRequest.Validate if the designated constraints aren't met.

func (CreateBucketRequestValidationError) Cause

Cause function returns cause value.

func (CreateBucketRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateBucketRequestValidationError) ErrorName

ErrorName returns error name.

func (CreateBucketRequestValidationError) Field

Field function returns field value.

func (CreateBucketRequestValidationError) Key

Key function returns key value.

func (CreateBucketRequestValidationError) Reason

Reason function returns reason value.

type CreateBucketResponse

type CreateBucketResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

CreateBucketResponse indicates successful creation

func (*CreateBucketResponse) Descriptor deprecated

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

Deprecated: Use CreateBucketResponse.ProtoReflect.Descriptor instead.

func (*CreateBucketResponse) GetSuccess

func (x *CreateBucketResponse) GetSuccess() bool

func (*CreateBucketResponse) ProtoMessage

func (*CreateBucketResponse) ProtoMessage()

func (*CreateBucketResponse) ProtoReflect

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

func (*CreateBucketResponse) Reset

func (x *CreateBucketResponse) Reset()

func (*CreateBucketResponse) String

func (x *CreateBucketResponse) String() string

func (*CreateBucketResponse) Validate

func (m *CreateBucketResponse) Validate() error

Validate checks the field values on CreateBucketResponse 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 (*CreateBucketResponse) ValidateAll

func (m *CreateBucketResponse) ValidateAll() error

ValidateAll checks the field values on CreateBucketResponse 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 CreateBucketResponseMultiError, or nil if none found.

type CreateBucketResponseMultiError

type CreateBucketResponseMultiError []error

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

func (CreateBucketResponseMultiError) AllErrors

func (m CreateBucketResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateBucketResponseMultiError) Error

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

type CreateBucketResponseValidationError

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

CreateBucketResponseValidationError is the validation error returned by CreateBucketResponse.Validate if the designated constraints aren't met.

func (CreateBucketResponseValidationError) Cause

Cause function returns cause value.

func (CreateBucketResponseValidationError) Error

Error satisfies the builtin error interface

func (CreateBucketResponseValidationError) ErrorName

ErrorName returns error name.

func (CreateBucketResponseValidationError) Field

Field function returns field value.

func (CreateBucketResponseValidationError) Key

Key function returns key value.

func (CreateBucketResponseValidationError) Reason

Reason function returns reason value.

type DeleteObjectRequest

type DeleteObjectRequest struct {

	// Bucket name where the file is stored
	BucketName string `protobuf:"bytes,1,opt,name=bucket_name,json=bucketName,proto3" json:"bucket_name,omitempty"`
	// Object key/path in storage
	ObjectKey string `protobuf:"bytes,2,opt,name=object_key,json=objectKey,proto3" json:"object_key,omitempty"`
	// contains filtered or unexported fields
}

DeleteObjectRequest contains the object key to delete

func (*DeleteObjectRequest) Descriptor deprecated

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

Deprecated: Use DeleteObjectRequest.ProtoReflect.Descriptor instead.

func (*DeleteObjectRequest) GetBucketName

func (x *DeleteObjectRequest) GetBucketName() string

func (*DeleteObjectRequest) GetObjectKey

func (x *DeleteObjectRequest) GetObjectKey() string

func (*DeleteObjectRequest) ProtoMessage

func (*DeleteObjectRequest) ProtoMessage()

func (*DeleteObjectRequest) ProtoReflect

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

func (*DeleteObjectRequest) Reset

func (x *DeleteObjectRequest) Reset()

func (*DeleteObjectRequest) String

func (x *DeleteObjectRequest) String() string

func (*DeleteObjectRequest) Validate

func (m *DeleteObjectRequest) Validate() error

Validate checks the field values on DeleteObjectRequest 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 (*DeleteObjectRequest) ValidateAll

func (m *DeleteObjectRequest) ValidateAll() error

ValidateAll checks the field values on DeleteObjectRequest 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 DeleteObjectRequestMultiError, or nil if none found.

type DeleteObjectRequestMultiError

type DeleteObjectRequestMultiError []error

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

func (DeleteObjectRequestMultiError) AllErrors

func (m DeleteObjectRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeleteObjectRequestMultiError) Error

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

type DeleteObjectRequestValidationError

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

DeleteObjectRequestValidationError is the validation error returned by DeleteObjectRequest.Validate if the designated constraints aren't met.

func (DeleteObjectRequestValidationError) Cause

Cause function returns cause value.

func (DeleteObjectRequestValidationError) Error

Error satisfies the builtin error interface

func (DeleteObjectRequestValidationError) ErrorName

ErrorName returns error name.

func (DeleteObjectRequestValidationError) Field

Field function returns field value.

func (DeleteObjectRequestValidationError) Key

Key function returns key value.

func (DeleteObjectRequestValidationError) Reason

Reason function returns reason value.

type DeleteObjectResponse

type DeleteObjectResponse struct {

	// Whether the deletion was successful
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

DeleteObjectResponse indicates successful deletion

func (*DeleteObjectResponse) Descriptor deprecated

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

Deprecated: Use DeleteObjectResponse.ProtoReflect.Descriptor instead.

func (*DeleteObjectResponse) GetSuccess

func (x *DeleteObjectResponse) GetSuccess() bool

func (*DeleteObjectResponse) ProtoMessage

func (*DeleteObjectResponse) ProtoMessage()

func (*DeleteObjectResponse) ProtoReflect

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

func (*DeleteObjectResponse) Reset

func (x *DeleteObjectResponse) Reset()

func (*DeleteObjectResponse) String

func (x *DeleteObjectResponse) String() string

func (*DeleteObjectResponse) Validate

func (m *DeleteObjectResponse) Validate() error

Validate checks the field values on DeleteObjectResponse 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 (*DeleteObjectResponse) ValidateAll

func (m *DeleteObjectResponse) ValidateAll() error

ValidateAll checks the field values on DeleteObjectResponse 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 DeleteObjectResponseMultiError, or nil if none found.

type DeleteObjectResponseMultiError

type DeleteObjectResponseMultiError []error

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

func (DeleteObjectResponseMultiError) AllErrors

func (m DeleteObjectResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeleteObjectResponseMultiError) Error

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

type DeleteObjectResponseValidationError

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

DeleteObjectResponseValidationError is the validation error returned by DeleteObjectResponse.Validate if the designated constraints aren't met.

func (DeleteObjectResponseValidationError) Cause

Cause function returns cause value.

func (DeleteObjectResponseValidationError) Error

Error satisfies the builtin error interface

func (DeleteObjectResponseValidationError) ErrorName

ErrorName returns error name.

func (DeleteObjectResponseValidationError) Field

Field function returns field value.

func (DeleteObjectResponseValidationError) Key

Key function returns key value.

func (DeleteObjectResponseValidationError) Reason

Reason function returns reason value.

type MediabaseServiceClient

type MediabaseServiceClient interface {
	// Ping is a simple GET request that returns a Pong message.
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
	// PresignUpload generates a presigned URL for uploading a file
	PresignUpload(ctx context.Context, in *PresignUploadRequest, opts ...grpc.CallOption) (*PresignUploadResponse, error)
	// PresignDownload generates a presigned URL for downloading a file
	PresignDownload(ctx context.Context, in *PresignDownloadRequest, opts ...grpc.CallOption) (*PresignDownloadResponse, error)
	// DeleteObject deletes a file from storage
	DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*DeleteObjectResponse, error)
	// CreateBucket creates a bucket and optionally sets it to public read
	CreateBucket(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*CreateBucketResponse, error)
}

MediabaseServiceClient is the client API for MediabaseService 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 MediabaseServiceServer

type MediabaseServiceServer interface {
	// Ping is a simple GET request that returns a Pong message.
	Ping(context.Context, *PingRequest) (*PingResponse, error)
	// PresignUpload generates a presigned URL for uploading a file
	PresignUpload(context.Context, *PresignUploadRequest) (*PresignUploadResponse, error)
	// PresignDownload generates a presigned URL for downloading a file
	PresignDownload(context.Context, *PresignDownloadRequest) (*PresignDownloadResponse, error)
	// DeleteObject deletes a file from storage
	DeleteObject(context.Context, *DeleteObjectRequest) (*DeleteObjectResponse, error)
	// CreateBucket creates a bucket and optionally sets it to public read
	CreateBucket(context.Context, *CreateBucketRequest) (*CreateBucketResponse, error)
	// contains filtered or unexported methods
}

MediabaseServiceServer is the server API for MediabaseService service. All implementations must embed UnimplementedMediabaseServiceServer for forward compatibility.

type PingRequest

type PingRequest struct {

	// Message must be non-empty and between 1-100 characters
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

PingRequest is the request message for the Ping RPC method.

func (*PingRequest) Descriptor deprecated

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) GetMessage

func (x *PingRequest) GetMessage() string

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect

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

func (*PingRequest) Reset

func (x *PingRequest) Reset()

func (*PingRequest) String

func (x *PingRequest) String() string

func (*PingRequest) Validate

func (m *PingRequest) Validate() error

Validate checks the field values on PingRequest 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 (*PingRequest) ValidateAll

func (m *PingRequest) ValidateAll() error

ValidateAll checks the field values on PingRequest 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 PingRequestMultiError, or nil if none found.

type PingRequestMultiError

type PingRequestMultiError []error

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

func (PingRequestMultiError) AllErrors

func (m PingRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PingRequestMultiError) Error

func (m PingRequestMultiError) Error() string

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

type PingRequestValidationError

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

PingRequestValidationError is the validation error returned by PingRequest.Validate if the designated constraints aren't met.

func (PingRequestValidationError) Cause

Cause function returns cause value.

func (PingRequestValidationError) Error

Error satisfies the builtin error interface

func (PingRequestValidationError) ErrorName

func (e PingRequestValidationError) ErrorName() string

ErrorName returns error name.

func (PingRequestValidationError) Field

Field function returns field value.

func (PingRequestValidationError) Key

Key function returns key value.

func (PingRequestValidationError) Reason

Reason function returns reason value.

type PingResponse

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

PingResponse is the response message for the Ping RPC method.

func (*PingResponse) Descriptor deprecated

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

Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.

func (*PingResponse) GetMessage

func (x *PingResponse) GetMessage() string

func (*PingResponse) ProtoMessage

func (*PingResponse) ProtoMessage()

func (*PingResponse) ProtoReflect

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

func (*PingResponse) Reset

func (x *PingResponse) Reset()

func (*PingResponse) String

func (x *PingResponse) String() string

func (*PingResponse) Validate

func (m *PingResponse) Validate() error

Validate checks the field values on PingResponse 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 (*PingResponse) ValidateAll

func (m *PingResponse) ValidateAll() error

ValidateAll checks the field values on PingResponse 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 PingResponseMultiError, or nil if none found.

type PingResponseMultiError

type PingResponseMultiError []error

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

func (PingResponseMultiError) AllErrors

func (m PingResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PingResponseMultiError) Error

func (m PingResponseMultiError) Error() string

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

type PingResponseValidationError

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

PingResponseValidationError is the validation error returned by PingResponse.Validate if the designated constraints aren't met.

func (PingResponseValidationError) Cause

Cause function returns cause value.

func (PingResponseValidationError) Error

Error satisfies the builtin error interface

func (PingResponseValidationError) ErrorName

func (e PingResponseValidationError) ErrorName() string

ErrorName returns error name.

func (PingResponseValidationError) Field

Field function returns field value.

func (PingResponseValidationError) Key

Key function returns key value.

func (PingResponseValidationError) Reason

Reason function returns reason value.

type PresignDownloadRequest

type PresignDownloadRequest struct {

	// Bucket name where the file is stored
	BucketName string `protobuf:"bytes,1,opt,name=bucket_name,json=bucketName,proto3" json:"bucket_name,omitempty"`
	// Object key/path in storage
	ObjectKey string `protobuf:"bytes,2,opt,name=object_key,json=objectKey,proto3" json:"object_key,omitempty"`
	// contains filtered or unexported fields
}

PresignDownloadRequest contains the object key for download

func (*PresignDownloadRequest) Descriptor deprecated

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

Deprecated: Use PresignDownloadRequest.ProtoReflect.Descriptor instead.

func (*PresignDownloadRequest) GetBucketName

func (x *PresignDownloadRequest) GetBucketName() string

func (*PresignDownloadRequest) GetObjectKey

func (x *PresignDownloadRequest) GetObjectKey() string

func (*PresignDownloadRequest) ProtoMessage

func (*PresignDownloadRequest) ProtoMessage()

func (*PresignDownloadRequest) ProtoReflect

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

func (*PresignDownloadRequest) Reset

func (x *PresignDownloadRequest) Reset()

func (*PresignDownloadRequest) String

func (x *PresignDownloadRequest) String() string

func (*PresignDownloadRequest) Validate

func (m *PresignDownloadRequest) Validate() error

Validate checks the field values on PresignDownloadRequest 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 (*PresignDownloadRequest) ValidateAll

func (m *PresignDownloadRequest) ValidateAll() error

ValidateAll checks the field values on PresignDownloadRequest 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 PresignDownloadRequestMultiError, or nil if none found.

type PresignDownloadRequestMultiError

type PresignDownloadRequestMultiError []error

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

func (PresignDownloadRequestMultiError) AllErrors

func (m PresignDownloadRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PresignDownloadRequestMultiError) Error

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

type PresignDownloadRequestValidationError

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

PresignDownloadRequestValidationError is the validation error returned by PresignDownloadRequest.Validate if the designated constraints aren't met.

func (PresignDownloadRequestValidationError) Cause

Cause function returns cause value.

func (PresignDownloadRequestValidationError) Error

Error satisfies the builtin error interface

func (PresignDownloadRequestValidationError) ErrorName

ErrorName returns error name.

func (PresignDownloadRequestValidationError) Field

Field function returns field value.

func (PresignDownloadRequestValidationError) Key

Key function returns key value.

func (PresignDownloadRequestValidationError) Reason

Reason function returns reason value.

type PresignDownloadResponse

type PresignDownloadResponse struct {

	// Presigned URL for downloading the file
	PresignedUrl string `protobuf:"bytes,1,opt,name=presigned_url,json=presignedUrl,proto3" json:"presigned_url,omitempty"`
	// Expiration time in seconds
	ExpiresIn int32 `protobuf:"varint,2,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"`
	// contains filtered or unexported fields
}

PresignDownloadResponse contains the presigned download URL

func (*PresignDownloadResponse) Descriptor deprecated

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

Deprecated: Use PresignDownloadResponse.ProtoReflect.Descriptor instead.

func (*PresignDownloadResponse) GetExpiresIn

func (x *PresignDownloadResponse) GetExpiresIn() int32

func (*PresignDownloadResponse) GetPresignedUrl

func (x *PresignDownloadResponse) GetPresignedUrl() string

func (*PresignDownloadResponse) ProtoMessage

func (*PresignDownloadResponse) ProtoMessage()

func (*PresignDownloadResponse) ProtoReflect

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

func (*PresignDownloadResponse) Reset

func (x *PresignDownloadResponse) Reset()

func (*PresignDownloadResponse) String

func (x *PresignDownloadResponse) String() string

func (*PresignDownloadResponse) Validate

func (m *PresignDownloadResponse) Validate() error

Validate checks the field values on PresignDownloadResponse 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 (*PresignDownloadResponse) ValidateAll

func (m *PresignDownloadResponse) ValidateAll() error

ValidateAll checks the field values on PresignDownloadResponse 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 PresignDownloadResponseMultiError, or nil if none found.

type PresignDownloadResponseMultiError

type PresignDownloadResponseMultiError []error

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

func (PresignDownloadResponseMultiError) AllErrors

func (m PresignDownloadResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PresignDownloadResponseMultiError) Error

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

type PresignDownloadResponseValidationError

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

PresignDownloadResponseValidationError is the validation error returned by PresignDownloadResponse.Validate if the designated constraints aren't met.

func (PresignDownloadResponseValidationError) Cause

Cause function returns cause value.

func (PresignDownloadResponseValidationError) Error

Error satisfies the builtin error interface

func (PresignDownloadResponseValidationError) ErrorName

ErrorName returns error name.

func (PresignDownloadResponseValidationError) Field

Field function returns field value.

func (PresignDownloadResponseValidationError) Key

Key function returns key value.

func (PresignDownloadResponseValidationError) Reason

Reason function returns reason value.

type PresignUploadRequest

type PresignUploadRequest struct {

	// Bucket name where the file should be uploaded
	BucketName string `protobuf:"bytes,1,opt,name=bucket_name,json=bucketName,proto3" json:"bucket_name,omitempty"`
	// Content type of the file (e.g., "image/jpeg", "image/png", "image/webp")
	ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// Maximum allowed size of the file in bytes (will be enforced by storage)
	MaxFileSize int64 `protobuf:"varint,3,opt,name=max_file_size,json=maxFileSize,proto3" json:"max_file_size,omitempty"`
	// Optional: Path/Folder where the file should be uploaded (e.g., "users/avatars")
	Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
	// Optional: Exact filename to use. If not provided, a unique UUID will be generated.
	FileName string `protobuf:"bytes,5,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
	// contains filtered or unexported fields
}

PresignUploadRequest contains the parameters for generating a presigned upload URL

func (*PresignUploadRequest) Descriptor deprecated

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

Deprecated: Use PresignUploadRequest.ProtoReflect.Descriptor instead.

func (*PresignUploadRequest) GetBucketName

func (x *PresignUploadRequest) GetBucketName() string

func (*PresignUploadRequest) GetContentType

func (x *PresignUploadRequest) GetContentType() string

func (*PresignUploadRequest) GetFileName

func (x *PresignUploadRequest) GetFileName() string

func (*PresignUploadRequest) GetMaxFileSize

func (x *PresignUploadRequest) GetMaxFileSize() int64

func (*PresignUploadRequest) GetPath

func (x *PresignUploadRequest) GetPath() string

func (*PresignUploadRequest) ProtoMessage

func (*PresignUploadRequest) ProtoMessage()

func (*PresignUploadRequest) ProtoReflect

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

func (*PresignUploadRequest) Reset

func (x *PresignUploadRequest) Reset()

func (*PresignUploadRequest) String

func (x *PresignUploadRequest) String() string

func (*PresignUploadRequest) Validate

func (m *PresignUploadRequest) Validate() error

Validate checks the field values on PresignUploadRequest 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 (*PresignUploadRequest) ValidateAll

func (m *PresignUploadRequest) ValidateAll() error

ValidateAll checks the field values on PresignUploadRequest 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 PresignUploadRequestMultiError, or nil if none found.

type PresignUploadRequestMultiError

type PresignUploadRequestMultiError []error

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

func (PresignUploadRequestMultiError) AllErrors

func (m PresignUploadRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PresignUploadRequestMultiError) Error

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

type PresignUploadRequestValidationError

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

PresignUploadRequestValidationError is the validation error returned by PresignUploadRequest.Validate if the designated constraints aren't met.

func (PresignUploadRequestValidationError) Cause

Cause function returns cause value.

func (PresignUploadRequestValidationError) Error

Error satisfies the builtin error interface

func (PresignUploadRequestValidationError) ErrorName

ErrorName returns error name.

func (PresignUploadRequestValidationError) Field

Field function returns field value.

func (PresignUploadRequestValidationError) Key

Key function returns key value.

func (PresignUploadRequestValidationError) Reason

Reason function returns reason value.

type PresignUploadResponse

type PresignUploadResponse struct {

	// Presigned URL for uploading the file
	PresignedUrl string `protobuf:"bytes,1,opt,name=presigned_url,json=presignedUrl,proto3" json:"presigned_url,omitempty"`
	// Object key/path in storage
	ObjectKey string `protobuf:"bytes,2,opt,name=object_key,json=objectKey,proto3" json:"object_key,omitempty"`
	// Expiration time in seconds
	ExpiresIn int32 `protobuf:"varint,3,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"`
	// Optional: Form data fields for POST upload (required for size enforcement)
	FormData map[string]string `` /* 159-byte string literal not displayed */
	// contains filtered or unexported fields
}

PresignUploadResponse contains the presigned URL and metadata

func (*PresignUploadResponse) Descriptor deprecated

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

Deprecated: Use PresignUploadResponse.ProtoReflect.Descriptor instead.

func (*PresignUploadResponse) GetExpiresIn

func (x *PresignUploadResponse) GetExpiresIn() int32

func (*PresignUploadResponse) GetFormData

func (x *PresignUploadResponse) GetFormData() map[string]string

func (*PresignUploadResponse) GetObjectKey

func (x *PresignUploadResponse) GetObjectKey() string

func (*PresignUploadResponse) GetPresignedUrl

func (x *PresignUploadResponse) GetPresignedUrl() string

func (*PresignUploadResponse) ProtoMessage

func (*PresignUploadResponse) ProtoMessage()

func (*PresignUploadResponse) ProtoReflect

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

func (*PresignUploadResponse) Reset

func (x *PresignUploadResponse) Reset()

func (*PresignUploadResponse) String

func (x *PresignUploadResponse) String() string

func (*PresignUploadResponse) Validate

func (m *PresignUploadResponse) Validate() error

Validate checks the field values on PresignUploadResponse 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 (*PresignUploadResponse) ValidateAll

func (m *PresignUploadResponse) ValidateAll() error

ValidateAll checks the field values on PresignUploadResponse 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 PresignUploadResponseMultiError, or nil if none found.

type PresignUploadResponseMultiError

type PresignUploadResponseMultiError []error

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

func (PresignUploadResponseMultiError) AllErrors

func (m PresignUploadResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PresignUploadResponseMultiError) Error

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

type PresignUploadResponseValidationError

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

PresignUploadResponseValidationError is the validation error returned by PresignUploadResponse.Validate if the designated constraints aren't met.

func (PresignUploadResponseValidationError) Cause

Cause function returns cause value.

func (PresignUploadResponseValidationError) Error

Error satisfies the builtin error interface

func (PresignUploadResponseValidationError) ErrorName

ErrorName returns error name.

func (PresignUploadResponseValidationError) Field

Field function returns field value.

func (PresignUploadResponseValidationError) Key

Key function returns key value.

func (PresignUploadResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedMediabaseServiceServer

type UnimplementedMediabaseServiceServer struct{}

UnimplementedMediabaseServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedMediabaseServiceServer) CreateBucket

func (UnimplementedMediabaseServiceServer) DeleteObject

func (UnimplementedMediabaseServiceServer) Ping

func (UnimplementedMediabaseServiceServer) PresignDownload

func (UnimplementedMediabaseServiceServer) PresignUpload

type UnsafeMediabaseServiceServer

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

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

Jump to

Keyboard shortcuts

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