backup

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

type Backup struct {
	Id        string `json:"id"`
	Name      string `json:"name"`
	Size      int64  `json:"size"`
	Type      string `json:"type"`
	Status    string `json:"status"`
	CreatedAt string `json:"createdAt"`
}

Backup represents a backup

type BackupCreateRequest

type BackupCreateRequest struct {
	Name string `json:"name"`
	Type string `json:"type"` // full, incremental
}

BackupCreateRequest represents the request to create a backup

type BackupCreateResponse

type BackupCreateResponse struct {
	Backup
}

BackupCreateResponse represents the response after creating a backup

type BackupDeleteRequest

type BackupDeleteRequest struct {
	ID string `uri:"id"`
}

BackupDeleteRequest represents the request to delete a backup

type BackupDetailResponse

type BackupDetailResponse struct {
	Backup
}

BackupDetailResponse represents the response with backup details

type BackupDownloadRequest

type BackupDownloadRequest struct {
	ID string `uri:"id"`
}

BackupDownloadRequest represents the request to download a backup

type BackupsListRequest

type BackupsListRequest struct {
	Page     int    `form:"page,optional,default=1"`
	PageSize int    `form:"pageSize,optional,default=20"`
	Type     string `form:"type"`
}

BackupsListRequest represents the request to list backups

type BackupsListResponse

type BackupsListResponse struct {
	Items []Backup `json:"items"`
	Total int64    `json:"total"`
	Page  int      `json:"page"`
	Size  int      `json:"pageSize"`
}

BackupsListResponse represents the response with a list of backups

type DownloadPayload

type DownloadPayload struct {
	Filename    string
	Size        int64
	Reader      interface{}
	RedirectURL string
}

DownloadPayload represents the download payload for a backup file

type Handler

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

func NewHandler

func NewHandler(service *Service) *Handler

func (*Handler) Create

func (h *Handler) Create(c *gin.Context)

Create handles the request to create a backup

func (*Handler) Delete

func (h *Handler) Delete(c *gin.Context)

Delete handles the request to delete a backup

func (*Handler) Download

func (h *Handler) Download(c *gin.Context)

Download handles the request to download a backup

func (*Handler) List

func (h *Handler) List(c *gin.Context)

List handles the request to list backups

type Service

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

func NewService

func NewService(svcCtx *svc.ServiceContext) *Service

func (*Service) Create

Create creates a new backup

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, req *BackupDeleteRequest) error

Delete deletes a backup

func (*Service) Download

Download downloads a backup file

func (*Service) List

List retrieves a paginated list of backups

Jump to

Keyboard shortcuts

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