manifest

package
v0.10.0-rc.1 Latest Latest
Warning

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

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

Documentation

Overview

Package manifest manages content resources, which contain all the resources for a deployed bundle.

Content resources are not namespaced.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentStore

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

func NewStore

func NewStore(client client.Client) *ContentStore

func (*ContentStore) Store

func (c *ContentStore) Store(ctx context.Context, manifest *Manifest) (string, error)

Store stores the manifest as a content resource and returns the name. It copies the resources from the bundle to the content resource.

type Lookup

type Lookup struct {
}

func NewLookup

func NewLookup() *Lookup

func (*Lookup) Get

func (l *Lookup) Get(ctx context.Context, client client.Reader, id string) (*Manifest, error)

type Manifest

type Manifest struct {
	Commit    string                 `json:"-"`
	Resources []fleet.BundleResource `json:"resources,omitempty"`
	// contains filtered or unexported fields
}

func FromBundle

func FromBundle(bundle *fleet.Bundle) *Manifest

func FromJSON

func FromJSON(data []byte, expectedSHAsum string) (*Manifest, error)

func New

func New(resources []fleet.BundleResource) *Manifest

func (*Manifest) Content

func (m *Manifest) Content() ([]byte, error)

Content retrieves the JSON serialization of the bundle resources

func (*Manifest) ID

func (m *Manifest) ID() (string, error)

ID returns the name of the Content resource produced from this Manifest

func (*Manifest) ResetSHASum

func (m *Manifest) ResetSHASum()

ResetSHASum removes stored data about calculated SHASum, forcing a recalculation on the next call to SHASum()

func (*Manifest) SHASum

func (m *Manifest) SHASum() (string, error)

SHASum returns the SHA256 sum of the JSON serialization

func (*Manifest) ToTarGZ

func (m *Manifest) ToTarGZ() (io.Reader, error)

Jump to

Keyboard shortcuts

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