api

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortOSImagesByName

func SortOSImagesByName(imgs []OS)

Types

type Config

type Config struct {
	ImageCacheRootPath string `validate:"required"`

	MinImagesPerName int   `validate:"required"`
	MaxImagesPerName int   `validate:"required"`
	MaxCacheSize     int64 `validate:"required"`

	ImageStore  string `validate:"required"`
	ImageBucket string `validate:"required"`

	MetalAPIEndpoint string `validate:"required"`
	MetalAPIHMAC     string `validate:"required"`

	BindAddress  string `validate:"required"`
	SyncSchedule string `validate:"required"`
	DryRun       bool
	ExcludePaths []string

	ExpirationGraceDays uint
}

func NewConfig

func NewConfig() (*Config, error)

func (*Config) Validate

func (c *Config) Validate(fs afero.Fs) error

type OS

type OS struct {
	Name      string
	Version   *semver.Version
	ApiRef    models.V1ImageResponse
	ImageRef  s3.Object
	MD5Ref    s3.Object
	BucketKey string
}

func (*OS) MajorMinor

func (o *OS) MajorMinor() (string, error)

type OSImagesByOS

type OSImagesByOS map[string]OSImagesByVersion

type OSImagesByVersion

type OSImagesByVersion map[string][]OS

Jump to

Keyboard shortcuts

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