image

package
v1.1.22-fix14 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const (
	WerfLabel                      = "werf"
	WerfVersionLabel               = "werf-version"
	WerfCacheVersionLabel          = "werf-cache-version"
	WerfImageLabel                 = "werf-image"
	WerfImageNameLabel             = "werf-image-name"
	WerfImageTagLabel              = "werf-image-tag"
	WerfDockerImageName            = "werf-docker-image-name"
	WerfStageSignatureLabel        = "werf-stage-signature"
	WerfStageContentSignatureLabel = "werf-stage-content-signature"
	WerfProjectRepoCommitLabel     = "werf-project-repo-commit"
	WerfContentSignatureLabel      = "werf-content-signature"
	WerfImageVersionLabel          = "werf-image-version"

	WerfMountTmpDirLabel          = "werf-mount-type-tmp-dir"
	WerfMountBuildDirLabel        = "werf-mount-type-build-dir"
	WerfMountCustomDirLabelPrefix = "werf-mount-type-custom-dir-"

	WerfImportLabelPrefix = "werf-import-"

	WerfTagStrategyLabel = "werf-tag-strategy"

	BuildCacheVersion = "1.1"
	WerfImageVersion  = "1"

	StageContainerNamePrefix = "werf.build."
)
View Source
const (
	ManifestCacheVersion = "2"
)

Variables

This section is empty.

Functions

func Init

func Init() error

func MustParseTimestampString

func MustParseTimestampString(timestampString string) time.Time

func ParseRepositoryAndTag

func ParseRepositoryAndTag(ref string) (string, string)

func ParseUniqueIDAsTimestamp

func ParseUniqueIDAsTimestamp(uniqueID string) (int64, error)

Types

type Info

type Info struct {
	Name       string `json:"name"`
	Repository string `json:"repository"`
	Tag        string `json:"tag"`
	RepoDigest string `json:"repoDigest"`

	ID                string            `json:"ID"`
	ParentID          string            `json:"parentID"`
	Labels            map[string]string `json:"labels"`
	Size              int64             `json:"size"`
	CreatedAtUnixNano int64             `json:"createdAtUnixNano"`
}

func NewInfoFromInspect

func NewInfoFromInspect(ref string, inspect *types.ImageInspect) *Info

func (*Info) GetCreatedAt

func (info *Info) GetCreatedAt() time.Time

func (*Info) SetCreatedAtUnix

func (info *Info) SetCreatedAtUnix(seconds int64)

func (*Info) SetCreatedAtUnixNano

func (info *Info) SetCreatedAtUnixNano(seconds int64)

type ManifestCache

type ManifestCache struct {
	CacheDir string
}
var CommonManifestCache *ManifestCache

func NewManifestCache

func NewManifestCache(cacheDir string) *ManifestCache

func (*ManifestCache) GetImageInfo

func (cache *ManifestCache) GetImageInfo(ctx context.Context, storageName, imageName string) (*Info, error)

func (*ManifestCache) StoreImageInfo

func (cache *ManifestCache) StoreImageInfo(ctx context.Context, storageName string, imgInfo *Info) error

type ManifestCacheRecord

type ManifestCacheRecord struct {
	AccessTimestamp int64
	Info            *Info
}

type StageDescription

type StageDescription struct {
	StageID *StageID `json:"stageID"`
	Info    *Info    `json:"info"`
}

type StageID

type StageID struct {
	Signature string `json:"signature"`
	UniqueID  int64  `json:"uniqueID"`
}

func (StageID) String

func (id StageID) String() string

func (StageID) UniqueIDAsTime

func (id StageID) UniqueIDAsTime() time.Time

Jump to

Keyboard shortcuts

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