mirrorrepository

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	*repository.RepoHandler
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(logger *slog.Logger, repoHandler *repository.RepoHandler) *Handler

func (*Handler) CreateRepository

func (h *Handler) CreateRepository(ctx context.Context, properties *apiv1.RepositoryProperties) (err error)

func (*Handler) Delete

func (h *Handler) Delete(filePath string, _ rsync.FileMode) error

func (*Handler) DeleteRepository

func (h *Handler) DeleteRepository(ctx context.Context, deleteFiles bool) (err error)

func (*Handler) GenerateIndexes

func (h *Handler) GenerateIndexes(remoteList rsync.FileList) error

func (*Handler) GetRepository

func (h *Handler) GetRepository(ctx context.Context) (properties *apiv1.RepositoryProperties, err error)

func (*Handler) GetRepositoryFile

func (h *Handler) GetRepositoryFile(ctx context.Context, file string) (repositoryFile *apiv1.RepositoryFile, err error)

func (*Handler) GetRepositorySyncStatus

func (h *Handler) GetRepositorySyncStatus(context.Context) (syncStatus *apiv1.SyncStatus, err error)

func (*Handler) List

func (h *Handler) List() (rsync.FileList, error)

func (*Handler) ListRepositoryFiles

func (h *Handler) ListRepositoryFiles(ctx context.Context, _ *apiv1.Page) (repositoryFiles []*apiv1.RepositoryFile, err error)

func (*Handler) ListRepositoryLogs

func (h *Handler) ListRepositoryLogs(ctx context.Context, _ *apiv1.Page) (logs []apiv1.RepositoryLog, err error)
func (h *Handler) ListRepositorySymlinks(ctx context.Context, _ *apiv1.Page) (repositoryFiles []*apiv1.RepositoryFile, err error)

func (*Handler) Put

func (h *Handler) Put(filePath string, content io.Reader, fileSize int64, metadata rsync.FileMetadata) (written int64, err error)

func (*Handler) QueueEvent

func (h *Handler) QueueEvent(event *eventv1.EventPayload, _ bool) error

func (*Handler) Start

func (h *Handler) Start(ctx context.Context)

func (*Handler) SyncRepository

func (h *Handler) SyncRepository(_ context.Context, wait bool) (err error)

func (*Handler) SyncRepositoryWithURL

func (h *Handler) SyncRepositoryWithURL(_ context.Context, url string, wait bool) (err error)

func (*Handler) UpdateRepository

func (h *Handler) UpdateRepository(ctx context.Context, properties *apiv1.RepositoryProperties) (err error)

Jump to

Keyboard shortcuts

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