ostree

package
v0.0.42 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

README

OSTree Plugin

Overview

The ostree plugin is responsible for mapping the ostree repository to the OCI registry. This is done in the router.rego and no routing execution happens within the plugin itself at runtime. The plugin does, however, provide an API for mirroring ostree repositories into beskar.

File Tagging

The ostree plugin maps the ostree repository filepaths to the OCI registry tags. Most files are simply mapped by hashing the full filepath relative to the ostree root. For example, objects/ab/abcd1234.filez becomes file:b8458bd029a97ca5e03f272a6b7bd0d1. There are a few exceptions to this rule, however. The following files are considered "special" and are tagged as follows:

  1. summary -> file:summary
  2. summary.sig -> file:summary.sig
  3. config -> file:config

There is no technical reason for this and is only done to make the mapping more human-readable in the case of "special" files.

Mirroring

TBD

Documentation

Index

Constants

View Source
const (
	PluginName           = "ostree"
	PluginAPIPathPattern = "/artifacts/ostree/api/v1"
)

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, beskarOSTreeConfig *config.BeskarOSTreeConfig) (*Plugin, error)

func (*Plugin) AddRemote

func (p *Plugin) AddRemote(ctx context.Context, repository string, properties *apiv1.OSTreeRemoteProperties) (err 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.OSTreeRepositoryProperties) (err error)

func (*Plugin) DeleteRemote added in v0.0.22

func (p *Plugin) DeleteRemote(ctx context.Context, repository string, remoteName string) (err error)

func (*Plugin) DeleteRepository

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

func (*Plugin) GetRepositorySyncStatus

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

func (*Plugin) ListRepositoryRefs added in v0.0.25

func (p *Plugin) ListRepositoryRefs(ctx context.Context, repository string) (refs []apiv1.OSTreeRef, err error)

func (*Plugin) RepositoryManager

func (p *Plugin) RepositoryManager() *repository.Manager[*ostreerepository.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, properties *apiv1.OSTreeRepositorySyncRequest) (err error)

func (*Plugin) UpdateRemote added in v0.0.22

func (p *Plugin) UpdateRemote(ctx context.Context, repository string, remoteName string, properties *apiv1.OSTreeRemoteProperties) (err error)

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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