handler

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: Apache-2.0 Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package handler /*

## License This project is licensed under the APACHE Licence. Refer to https://github.com/mstgnz/go-minio-cdn/blob/main/LICENSE for more information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsHandler

type AwsHandler interface {
	GlacierVaultList(c *fiber.Ctx) error
	BucketList(c *fiber.Ctx) error
	BucketExists(c *fiber.Ctx) error
	// New glacier methods
	GlacierInitiateRetrieval(c *fiber.Ctx) error
	GlacierListJobs(c *fiber.Ctx) error
	GlacierDownloadArchive(c *fiber.Ctx) error
	GlacierJobStatus(c *fiber.Ctx) error
	GlacierInventoryRetrieval(c *fiber.Ctx) error
	// New async download methods
	GlacierInitiateAsyncDownload(c *fiber.Ctx) error
	GlacierCheckDownloadStatus(c *fiber.Ctx) error
}

func NewAwsHandler

func NewAwsHandler(awsService service.AwsService) AwsHandler

type BatchDeleteRequest added in v1.5.0

type BatchDeleteRequest struct {
	Bucket    string   `json:"bucket" validate:"required"`
	Files     []string `json:"files" validate:"required,min=1"`
	AWSDelete bool     `json:"aws_delete"`
}

BatchDeleteRequest represents the request body for batch deletions

type BatchUploadRequest added in v1.5.0

type BatchUploadRequest struct {
	Bucket    string   `json:"bucket" validate:"required"`
	Path      string   `json:"path"`
	Files     []string `json:"files" validate:"required,min=1"`
	AWSUpload bool     `json:"aws_upload"`
}

BatchUploadRequest represents the request body for batch uploads

type DownloadJob added in v1.6.0

type DownloadJob struct {
	ID           string     `json:"id"`
	VaultName    string     `json:"vaultName"`
	JobID        string     `json:"jobId"`
	TargetBucket string     `json:"targetBucket,omitempty"`
	TargetPath   string     `json:"targetPath"`
	Status       string     `json:"status"` // pending, processing, completed, failed
	Error        string     `json:"error,omitempty"`
	StartTime    time.Time  `json:"startTime"`
	EndTime      *time.Time `json:"endTime,omitempty"`
	DownloadType string     `json:"downloadType"` // minio, local, stream
}

DownloadJob represents an async download job

type HealthChecker added in v1.5.0

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

func NewHealthChecker added in v1.5.0

func NewHealthChecker(minioClient *minio.Client, awsService service.AwsService, cache service.CacheService) *HealthChecker

func (*HealthChecker) HealthCheck added in v1.5.0

func (h *HealthChecker) HealthCheck(c *fiber.Ctx) error

HealthCheck handles health check requests

type Image

type Image interface {
	GetImage(c *fiber.Ctx) error
	UploadImage(c *fiber.Ctx) error
	DeleteImage(c *fiber.Ctx) error
	ResizeImage(c *fiber.Ctx) error
	UploadWithUrl(c *fiber.Ctx) error
	BatchUpload(c *fiber.Ctx) error
	BatchDelete(c *fiber.Ctx) error
}

func NewImage

func NewImage(minioClient *minio.Client, awsService service.AwsService, imageService *service.ImageService) Image

type ImageProcessRequest added in v1.5.0

type ImageProcessRequest struct {
	File        []byte
	Width       uint
	Height      uint
	ContentType string
	Filename    string
}

ImageProcessRequest represents an image processing request

type MinioHandler added in v1.2.1

type MinioHandler interface {
	BucketList(c *fiber.Ctx) error
	BucketExists(c *fiber.Ctx) error
	CreateBucket(c *fiber.Ctx) error
	RemoveBucket(c *fiber.Ctx) error
}

func NewMinioHandler added in v1.2.1

func NewMinioHandler(minioClient *minio.Client) MinioHandler

type MonitoringStats added in v1.5.0

type MonitoringStats struct {
	Timestamp     time.Time        `json:"timestamp"`
	ActiveUploads int              `json:"active_uploads"`
	UploadSpeed   float64          `json:"upload_speed"`
	CacheHitRate  float64          `json:"cache_hit_rate"`
	CPUUsage      float64          `json:"cpu_usage"`
	MemoryUsage   float64          `json:"memory_usage"`
	DiskUsage     map[string]int64 `json:"disk_usage"`
	Errors        []string         `json:"errors"`
}

type UploadUrlRequest added in v1.5.0

type UploadUrlRequest struct {
	Path      string `json:"path"`
	Bucket    string `json:"bucket" validate:"required"`
	URL       string `json:"url" validate:"required,url"`
	AWSUpload bool   `json:"aws_upload"`
}

UploadUrlRequest represents the request body for URL-based uploads

type WebSocketHandler added in v1.5.0

type WebSocketHandler interface {
	HandleWebSocket(c *websocket.Conn) error
	MonitorStats(c *fiber.Ctx) error
}

func NewWebSocketHandler added in v1.5.0

func NewWebSocketHandler(stats *service.StatsService) WebSocketHandler

Jump to

Keyboard shortcuts

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