loaders

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

The loaders package implements loading of raw kubernetes manifests based off of the CommonSpec of an Addon object.

Index

Constants

This section is empty.

Variables

View Source
var FlagChannel = "./channels"

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Manifests []Version `json:"manifests,omitempty"`
}

func (*Channel) Latest

func (c *Channel) Latest() (*Version, error)

type FSRepository

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

FSRepository is a Repository backed by a filesystem

func NewFSRepository

func NewFSRepository(basedir string) *FSRepository

NewFSRepository is the constructor for an FSRepository

func (*FSRepository) LoadChannel

func (r *FSRepository) LoadChannel(ctx context.Context, name string) (*Channel, error)

func (*FSRepository) LoadManifest

func (r *FSRepository) LoadManifest(ctx context.Context, packageName string, id string) (string, error)

type ManifestLoader

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

func NewManifestLoader

func NewManifestLoader() *ManifestLoader

NewManifestLoader provides a Repository that resolves versions based on an Addon object and loads manifests from the filesystem.

func (*ManifestLoader) ResolveManifest

func (c *ManifestLoader) ResolveManifest(ctx context.Context, object runtime.Object) (string, error)

type Repository

type Repository interface {
	LoadChannel(ctx context.Context, name string) (*Channel, error)
	LoadManifest(ctx context.Context, packageName string, id string) (string, error)
}

type Version

type Version struct {
	Version string
}

Jump to

Keyboard shortcuts

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