store

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRemote = "origin"
	DefaultBranch = "master"
)

Variables

This section is empty.

Functions

func FetchArtifact

func FetchArtifact(reader ArtifactReader) (*unstructured.Unstructured, error)

FetchArtifact from the location, decode it using explicit types, and unstructure it

func NewMinioClient

func NewMinioClient(s3 *apicommon.S3Artifact, creds Credentials) (*minio.Client, error)

NewMinioClient instantiates a new minio client object to access s3 compatible APIs

Types

type ArtifactReader

type ArtifactReader interface {
	Read() ([]byte, error)
}

ArtifactReader enables reading artifacts from an external store

func GetArtifactReader

func GetArtifactReader(loc *v1alpha1.ArtifactLocation, creds *Credentials) (ArtifactReader, error)

GetArtifactReader returns the ArtifactReader for this location

func NewFileReader

func NewFileReader(fileArtifact *v1alpha1.FileArtifact) (ArtifactReader, error)

NewFileReader creates a new ArtifactReader for inline

func NewInlineReader

func NewInlineReader(inlineArtifact *string) (ArtifactReader, error)

NewInlineReader creates a new ArtifactReader for inline

func NewResourceReader added in v0.9.1

func NewResourceReader(resourceArtifact *common.Resource) (ArtifactReader, error)

NewResourceReader creates a new ArtifactReader for resource

func NewS3Reader

func NewS3Reader(s3 *apicommon.S3Artifact, creds *Credentials) (ArtifactReader, error)

NewS3Reader creates a new ArtifactReader for an S3 compatible store

func NewURLReader

func NewURLReader(urlArtifact *v1alpha1.URLArtifact) (ArtifactReader, error)

NewURLReader creates a new ArtifactReader for workflows at URL endpoints.

type ConfigMapReader

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

ConfigMapReader implements the ArtifactReader interface for k8 configmap

func NewConfigMapReader

func NewConfigMapReader(configmapArtifact *corev1.ConfigMapKeySelector) (*ConfigMapReader, error)

NewConfigMapReader returns a new configmap reader

func (*ConfigMapReader) Read

func (c *ConfigMapReader) Read() (body []byte, err error)

type Credentials

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

Credentials contains the information necessary to access the minio

func GetCredentials

func GetCredentials(art *v1alpha1.ArtifactLocation) (*Credentials, error)

GetCredentials for this minio

type FileReader

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

FileReader implements the ArtifactReader interface for file artifacts

func (*FileReader) Read

func (reader *FileReader) Read() ([]byte, error)

type GitArtifactReader

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

func NewGitReader

func NewGitReader(gitArtifact *v1alpha1.GitArtifact) (*GitArtifactReader, error)

NewGitReader returns a new git reader

func (*GitArtifactReader) Read

func (g *GitArtifactReader) Read() ([]byte, error)

type InlineReader

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

InlineReader implements the ArtifactReader interface for inlined artifacts

func (*InlineReader) Read

func (reader *InlineReader) Read() ([]byte, error)

type ResourceReader added in v0.9.1

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

ResourceReader implements the ArtifactReader interface for resource artifacts

func (*ResourceReader) Read added in v0.9.1

func (reader *ResourceReader) Read() ([]byte, error)

type S3Reader

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

S3Reader implements the ArtifactReader interface and allows reading artifacts from S3 compatible API store

func (*S3Reader) Read

func (reader *S3Reader) Read() ([]byte, error)

type URLReader

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

URLReader implements the ArtifactReader interface for urls

func (*URLReader) Read

func (reader *URLReader) Read() ([]byte, error)

Jump to

Keyboard shortcuts

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