repository

package
v0.0.0-...-1012e11 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const RepositoryLabel = "repository.atlas.jpereira.co.uk"

Variables

This section is empty.

Functions

func NewUseCase

func NewUseCase(productCreator ProductCreator, releaseRepo ReleaseRepo) *useCase

func NewUseCaseWithReader

func NewUseCaseWithReader(productCreator ProductCreator, releaseRepo ReleaseRepo, reader RegistryReader) *useCase

Types

type Dependency

type Dependency struct {
	Product `json:",inline"`
}

type ImageJSON

type ImageJSON struct {
	Product      `json:",inline"`
	Description  string       `json:"description,omitempty"`
	ImageRepo    string       `json:"imageRepo,omitempty"`
	ImageSHA     string       `json:"imageSha,omitempty"`
	Dependencies []Dependency `json:"dependencies,omitempty"`
	UpgradesFrom []Version    `json:"upgradesFrom,omitempty"`
}

type ImageLabel

type ImageLabel struct {
	Images ImagesJSON
}

type ImagesJSON

type ImagesJSON = []ImageJSON

type Product

type Product struct {
	Name    string  `json:"name,omitempty"`
	Slug    string  `json:"slug,omitempty"`
	Version Version `json:"version,omitempty"`
}

type ProductCreator

type ProductCreator interface {
	CreateOrUpdate(ref *metav1.OwnerReference, namespace string, imageJson ImageJSON) error
}

type RegistryReader

type RegistryReader interface {
	GetImagesFromRepository(imageRepository string, option ...remote.Option) (string, string, error)
}

type ReleaseRepo

type ReleaseRepo interface {
	Save(release atlasv1alpha1.ProductRelease) error
}

type Version

type Version struct {
	MajorV string `json:"major,omitempty"`
	MinorV string `json:"minor,omitempty"`
	PatchV string `json:"patch,omitempty"`
}

func NewVersion

func NewVersion(version string) Version

func (Version) Major

func (v Version) Major() string

func (Version) Minor

func (v Version) Minor() string

func (Version) Patch

func (v Version) Patch() string

Jump to

Keyboard shortcuts

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