Documentation
¶
Index ¶
- type BatchDeleteObjectsData
- type BatchDeleteObjectsRequest
- type BatchDeleteObjectsResponse
- type CreateDirectoryRequest
- type CreateDirectoryRequestAlias
- type CreateDirectoryResponse
- type CreateDirectoryResponseAlias
- type DeleteObjectRequest
- type DeleteObjectRequestAlias
- type DeleteObjectResponse
- type DeleteObjectResponseAlias
- type Handler
- func (h *Handler) BatchDeleteObjects(c *gin.Context)
- func (h *Handler) CreateDirectory(c *gin.Context)
- func (h *Handler) DeleteObject(c *gin.Context)
- func (h *Handler) ListObjects(c *gin.Context)
- func (h *Handler) RenameDirectory(c *gin.Context)
- func (h *Handler) SignedURL(c *gin.Context)
- func (h *Handler) SignedUrl(c *gin.Context)
- func (h *Handler) UploadObject(c *gin.Context)
- type ListObjectsRequest
- type ListObjectsRequestAlias
- type ListObjectsResponse
- type ListObjectsResponseAlias
- type ObjectInfo
- type ObjectInfoAlias
- type ObjectsData
- type ObjectsDataAlias
- type RenameDirectoryRequest
- type RenameDirectoryResponse
- type Service
- func (s *Service) BatchDeleteObjects(ctx context.Context, req *BatchDeleteObjectsRequest) (*BatchDeleteObjectsResponse, error)
- func (s *Service) CreateDirectory(ctx context.Context, req *CreateDirectoryRequest) (*CreateDirectoryResponse, error)
- func (s *Service) DeleteObject(ctx context.Context, req *DeleteObjectRequest) (*DeleteObjectResponse, error)
- func (s *Service) ListObjects(ctx context.Context, req *ListObjectsRequest) (*ListObjectsResponse, error)
- func (s *Service) RenameDirectory(ctx context.Context, req *RenameDirectoryRequest) (*RenameDirectoryResponse, error)
- func (s *Service) SignedUrl(ctx context.Context, req *SignedUrlRequest) (*SignedUrlResponse, error)
- func (s *Service) UploadObject(ctx context.Context, req *UploadObjectRequest) (*UploadObjectResponse, error)
- type SignedUrlRequest
- type SignedUrlRequestAlias
- type SignedUrlResponse
- type SignedUrlResponseAlias
- type UploadObjectData
- type UploadObjectDataAlias
- type UploadObjectRequest
- type UploadObjectRequestAlias
- type UploadObjectResponse
- type UploadObjectResponseAlias
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchDeleteObjectsData ¶
type BatchDeleteObjectsData struct {
Deleted []string `json:"deleted"`
Failed []string `json:"failed"`
}
BatchDeleteObjectsData represents the data for batch delete objects response
type BatchDeleteObjectsRequest ¶
type BatchDeleteObjectsRequest struct {
Paths []string `json:"paths"`
}
BatchDeleteObjectsRequest represents a request to batch delete objects
type BatchDeleteObjectsResponse ¶
type BatchDeleteObjectsResponse struct {
Deleted []string `json:"deleted"`
Failed []string `json:"failed"`
}
BatchDeleteObjectsResponse represents the response for batch deleting objects
type CreateDirectoryRequest ¶
type CreateDirectoryRequest struct {
Prefix string `json:"prefix"`
}
CreateDirectoryRequest represents a request to create a directory
type CreateDirectoryRequestAlias ¶
type CreateDirectoryRequestAlias = CreateDirectoryRequest
Type aliases for backward compatibility with types.CreateDirectoryRequest Deprecated: Use storage.CreateDirectoryRequest directly.
type CreateDirectoryResponse ¶
type CreateDirectoryResponse struct {
Prefix string `json:"prefix"`
}
CreateDirectoryResponse represents the response for creating a directory
type CreateDirectoryResponseAlias ¶
type CreateDirectoryResponseAlias = CreateDirectoryResponse
Type aliases for backward compatibility with types.CreateDirectoryResponse Deprecated: Use storage.CreateDirectoryResponse directly.
type DeleteObjectRequest ¶
type DeleteObjectRequest struct {
Path string `form:"path"`
}
DeleteObjectRequest represents a request to delete an object
type DeleteObjectRequestAlias ¶
type DeleteObjectRequestAlias = DeleteObjectRequest
Type aliases for backward compatibility with types.DeleteObjectRequest Deprecated: Use storage.DeleteObjectRequest directly.
type DeleteObjectResponse ¶
type DeleteObjectResponse struct {
Path string `json:"path"`
}
DeleteObjectResponse represents the response for deleting an object
type DeleteObjectResponseAlias ¶
type DeleteObjectResponseAlias = DeleteObjectResponse
Type aliases for backward compatibility with types.DeleteObjectResponse Deprecated: Use storage.DeleteObjectResponse directly.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) BatchDeleteObjects ¶
BatchDeleteObjects handles the request to batch delete objects
func (*Handler) CreateDirectory ¶
CreateDirectory handles the request to create a directory
func (*Handler) DeleteObject ¶
DeleteObject handles the request to delete an object
func (*Handler) ListObjects ¶
ListObjects handles the request to list objects
func (*Handler) RenameDirectory ¶
RenameDirectory handles the request to rename a directory
func (*Handler) UploadObject ¶
UploadObject handles the request to upload an object
type ListObjectsRequest ¶
type ListObjectsRequest struct {
Prefix string `form:"prefix"`
Delimiter string `form:"delimiter"`
Marker string `form:"marker"`
MaxKeys int `form:"maxKeys"`
Limit int `form:"limit"`
StorageClassURL string `form:"storageClassUrl"`
}
ListObjectsRequest represents a request to list objects
type ListObjectsRequestAlias ¶
type ListObjectsRequestAlias = ListObjectsRequest
Type aliases for backward compatibility with types.ListObjectsRequest Deprecated: Use storage.ListObjectsRequest directly.
type ListObjectsResponse ¶
type ListObjectsResponse struct {
Objects []ObjectInfo `json:"objects"`
Prefixes []string `json:"prefixes"`
IsTruncated bool `json:"is_truncated"`
NextMarker string `json:"next_marker"`
}
ListObjectsResponse represents the response for listing objects
type ListObjectsResponseAlias ¶
type ListObjectsResponseAlias = ListObjectsResponse
Type aliases for backward compatibility with types.ListObjectsResponse Deprecated: Use storage.ListObjectsResponse directly.
type ObjectInfo ¶
type ObjectInfo struct {
Key string `json:"key"`
Size int64 `json:"size"`
LastModified string `json:"last_modified"`
ETag string `json:"etag"`
StorageClass string `json:"storage_class"`
}
ObjectInfo represents information about a storage object
type ObjectInfoAlias ¶
type ObjectInfoAlias = ObjectInfo
Type aliases for backward compatibility with types.ObjectInfo Deprecated: Use storage.ObjectInfo directly.
type ObjectsData ¶
type ObjectsData = ListObjectsResponse
ObjectsData represents the data returned when listing objects
type ObjectsDataAlias ¶
type ObjectsDataAlias = ObjectsData
Type aliases for backward compatibility with types.ObjectsData Deprecated: Use storage.ObjectsData directly.
type RenameDirectoryRequest ¶
type RenameDirectoryRequest struct {
OldPrefix string `json:"oldPrefix"`
NewPrefix string `json:"newPrefix"`
}
RenameDirectoryRequest represents a request to rename a directory
type RenameDirectoryResponse ¶
type RenameDirectoryResponse struct {
OldPrefix string `json:"oldPrefix"`
NewPrefix string `json:"newPrefix"`
}
RenameDirectoryResponse represents the response for renaming a directory
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(svcCtx *svc.ServiceContext) *Service
func (*Service) BatchDeleteObjects ¶
func (s *Service) BatchDeleteObjects(ctx context.Context, req *BatchDeleteObjectsRequest) (*BatchDeleteObjectsResponse, error)
BatchDeleteObjects batch deletes objects from storage
func (*Service) CreateDirectory ¶
func (s *Service) CreateDirectory(ctx context.Context, req *CreateDirectoryRequest) (*CreateDirectoryResponse, error)
CreateDirectory creates a directory in storage
func (*Service) DeleteObject ¶
func (s *Service) DeleteObject(ctx context.Context, req *DeleteObjectRequest) (*DeleteObjectResponse, error)
DeleteObject deletes an object from storage
func (*Service) ListObjects ¶
func (s *Service) ListObjects(ctx context.Context, req *ListObjectsRequest) (*ListObjectsResponse, error)
ListObjects lists objects in the storage
func (*Service) RenameDirectory ¶
func (s *Service) RenameDirectory(ctx context.Context, req *RenameDirectoryRequest) (*RenameDirectoryResponse, error)
RenameDirectory renames a directory in storage
func (*Service) SignedUrl ¶
func (s *Service) SignedUrl(ctx context.Context, req *SignedUrlRequest) (*SignedUrlResponse, error)
SignedUrl generates a signed URL for object access
func (*Service) UploadObject ¶
func (s *Service) UploadObject(ctx context.Context, req *UploadObjectRequest) (*UploadObjectResponse, error)
UploadObject uploads an object to storage
type SignedUrlRequest ¶
SignedUrlRequest represents a request to get a signed URL
type SignedUrlRequestAlias ¶
type SignedUrlRequestAlias = SignedUrlRequest
Type aliases for backward compatibility with types.SignedUrlRequest Deprecated: Use storage.SignedUrlRequest directly.
type SignedUrlResponse ¶
type SignedUrlResponse struct {
URL string `json:"url"`
}
SignedUrlResponse represents the response for getting a signed URL
type SignedUrlResponseAlias ¶
type SignedUrlResponseAlias = SignedUrlResponse
Type aliases for backward compatibility with types.SignedUrlResponse Deprecated: Use storage.SignedUrlResponse directly.
type UploadObjectData ¶
type UploadObjectData struct {
Path string `json:"path"`
}
UploadObjectData represents the data for upload object response
type UploadObjectDataAlias ¶
type UploadObjectDataAlias = UploadObjectData
Type aliases for backward compatibility with types.UploadObjectData Deprecated: Use storage.UploadObjectData directly.
type UploadObjectRequest ¶
type UploadObjectRequest struct {
Path string `form:"path"`
ContentType string `form:"contentType"`
Content string `form:"content"`
StorageClass string `form:"storageClass"`
PreassignedID string `form:"preassignedId"`
File objstore.ReadSeeker `form:"-" json:"-"`
Size int64 `form:"-" json:"-"`
OriginalName string `form:"-" json:"-"`
}
UploadObjectRequest represents a request to upload an object
type UploadObjectRequestAlias ¶
type UploadObjectRequestAlias = UploadObjectRequest
Type aliases for backward compatibility with types.UploadObjectRequest Deprecated: Use storage.UploadObjectRequest directly.
type UploadObjectResponse ¶
type UploadObjectResponse struct {
Path string `json:"path"`
}
UploadObjectResponse represents the response for uploading an object
type UploadObjectResponseAlias ¶
type UploadObjectResponseAlias = UploadObjectResponse
Type aliases for backward compatibility with types.UploadObjectResponse Deprecated: Use storage.UploadObjectResponse directly.