mirror

package
v0.0.29 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

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

func New

func New(ctx context.Context, beskarMirrorConfig *config.BeskarMirrorConfig) (*Plugin, error)

func (*Plugin) Config

func (p *Plugin) Config() pluginsrv.Config

func (*Plugin) Context

func (p *Plugin) Context() context.Context

func (*Plugin) CreateRepository

func (p *Plugin) CreateRepository(ctx context.Context, repository string, properties *apiv1.RepositoryProperties) (err error)

func (*Plugin) DeleteRepository

func (p *Plugin) DeleteRepository(ctx context.Context, repository string, deleteFiles bool) (err error)

func (*Plugin) GetRepository

func (p *Plugin) GetRepository(ctx context.Context, repository string) (properties *apiv1.RepositoryProperties, err error)

func (*Plugin) GetRepositoryFile

func (p *Plugin) GetRepositoryFile(ctx context.Context, repository, file string) (repositoryFile *apiv1.RepositoryFile, err error)

func (*Plugin) GetRepositorySyncStatus

func (p *Plugin) GetRepositorySyncStatus(ctx context.Context, repository string) (syncStatus *apiv1.SyncStatus, err error)

func (*Plugin) ListRepositoryFiles

func (p *Plugin) ListRepositoryFiles(ctx context.Context, repository string, page *apiv1.Page) (repositoryFiles []*apiv1.RepositoryFile, err error)

func (*Plugin) ListRepositoryLogs

func (p *Plugin) ListRepositoryLogs(ctx context.Context, repository string, page *apiv1.Page) (logs []apiv1.RepositoryLog, err error)

func (*Plugin) RepositoryManager

func (p *Plugin) RepositoryManager() *repository.Manager[*mirrorrepository.Handler]

func (*Plugin) Start

func (p *Plugin) Start(transport http.RoundTripper, _ *mtls.CAPEM, beskarMeta *gossip.BeskarMeta) error

func (*Plugin) SyncRepository

func (p *Plugin) SyncRepository(ctx context.Context, repository string, wait bool) (err error)

func (*Plugin) UpdateRepository

func (p *Plugin) UpdateRepository(ctx context.Context, repository string, properties *apiv1.RepositoryProperties) (err error)

func (*Plugin) WebHandler

func (p *Plugin) WebHandler(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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