handler

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

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
}

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 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, cacheService service.CacheService) 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