common

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Image Image
	Name  string
}

func NewContainer

func NewContainer(image Image, name string) *Container

type Image

type Image struct {
	// Name combines Host, User, and Project
	// DockerImage is the kubernetes .Image string, which may or may not include the registry, user, tag, and sha
	//   DockerImage should probably only be used as a human-readable string, not for storing or organizing
	//   data, because it is so nebulous and ambiguous.
	Name        string
	Sha         string
	DockerImage string
}

func NewImage

func NewImage(name string, sha string, dockerImage string) *Image

func (*Image) CreateURL

func (image *Image) CreateURL() string

CreateURL returns the URL used for hitting the docker daemon's create endpoint

func (*Image) GetURL

func (image *Image) GetURL() string

GetURL returns the URL used for hitting the docker daemon's get endpoint

func (*Image) HubProjectName

func (image *Image) HubProjectName() string

func (*Image) HubScanName

func (image *Image) HubScanName() string

HubScanName has to be unique; otherwise, multiple code locations could be mapped to the same scan, which would be confusing

func (*Image) HubVersionName

func (image *Image) HubVersionName() string

func (*Image) HumanReadableName

func (image *Image) HumanReadableName() string

Name returns a nice, easy to read string

func (*Image) ShaName

func (image *Image) ShaName() string

FullName combines Name with the image sha

func (*Image) TarFilePath

func (image *Image) TarFilePath() string

func (*Image) URLEncodedName

func (image *Image) URLEncodedName() string

type Pod

type Pod struct {
	Name       string
	UID        string
	Namespace  string
	Containers []Container
}

func NewPod

func NewPod(name string, uid string, namespace string, containers []Container) *Pod

func (*Pod) QualifiedName

func (pod *Pod) QualifiedName() string

Jump to

Keyboard shortcuts

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