image

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetaDataFile

func MetaDataFile() string

func ReadCellImageYaml added in v0.3.0

func ReadCellImageYaml(repo, cellImage string) ([]byte, error)

func ValidateImageTag added in v0.4.0

func ValidateImageTag(imageTag string) error

ValidateImageTag validates the image tag (without the registry in it).

func ValidateImageTagWithRegistry added in v0.4.0

func ValidateImageTagWithRegistry(imageTag string) error

ValidateImageTag validates the image tag (with the registry in it). The registry is an option element in this validation.

Types

type Cell added in v0.4.0

type Cell struct {
	Kind     string       `json:"kind"`
	MetaData CellMetaData `json:"metadata"`
	Spec     CellSpec     `json:"spec"`
	Status   CellStatus   `json:"status"`
}

type CellAnnotations added in v0.4.0

type CellAnnotations struct {
	Organization string `json:"mesh.cellery.io/cell-image-org"`
	Name         string `json:"mesh.cellery.io/cell-image-name"`
	Version      string `json:"mesh.cellery.io/cell-image-version"`
}

type CellImage added in v0.4.0

type CellImage struct {
	Registry     string
	Organization string
	ImageName    string
	ImageVersion string
}

func ParseImageTag added in v0.4.0

func ParseImageTag(cellImageString string) (parsedCellImage *CellImage, err error)

ParseImageTag parses the given image name string and returns a CellImage struct with the relevant information.

type CellImageName added in v0.4.0

type CellImageName struct {
	Organization string `json:"org"`
	Name         string `json:"name"`
	Version      string `json:"ver"`
}

type CellMetaData added in v0.4.0

type CellMetaData struct {
	CreationTimestamp string          `json:"creationTimestamp"`
	Annotations       CellAnnotations `json:"annotations"`
	Name              string          `json:"name"`
}

type CellSpec added in v0.4.0

type CellSpec struct {
	Components []Component `json:"components"`
	Gateway    Gateway     `json:"gateway,omitempty"`
}

type CellStatus added in v0.4.0

type CellStatus struct {
	Status         string `json:"status"`
	Gateway        string `json:"gatewayServiceName"`
	ComponentCount int    `json:"componentCount"`
}

type ClusterIngress added in v0.4.0

type ClusterIngress struct {
	Host string `json:"host"`
}

type Component added in v0.4.0

type Component struct {
	Metadata ComponentMetadata `json:"metadata"`
	Spec     ComponentSpec     `json:"spec"`
}

type ComponentDependencies added in v0.4.0

type ComponentDependencies struct {
	Cells      map[string]*MetaData `json:"cells"`
	Composites map[string]*MetaData `json:"composites"`
	Components []string             `json:"components"`
}

type ComponentMetaData added in v0.4.0

type ComponentMetaData struct {
	DockerImage          string                 `json:"dockerImage"`
	IsDockerPushRequired bool                   `json:"isDockerPushRequired"`
	Labels               map[string]string      `json:"labels"`
	IngressTypes         []string               `json:"ingressTypes"`
	Dependencies         *ComponentDependencies `json:"dependencies"`
}

type ComponentMetadata added in v0.4.0

type ComponentMetadata struct {
	Name string `json:"name"`
}

type ComponentPort added in v0.4.0

type ComponentPort struct {
	Protocol string `json:"protocol"`
	Port     string `json:"port"`
}

type ComponentSpec added in v0.4.0

type ComponentSpec struct {
	Ports []ComponentPort `json:"ports"`
}

type Destination added in v0.4.0

type Destination struct {
	Host string `json:"host"`
}

type Extensions added in v0.4.0

type Extensions struct {
	ClusterIngress ClusterIngress `json:"clusterIngress"`
}

type Gateway added in v0.4.0

type Gateway struct {
	Spec GatewaySpec `json:"spec"`
}

type GatewaySpec added in v0.4.0

type GatewaySpec struct {
	Ingress Ingress `json:"ingress"`
}

type GrpcIngress added in v0.4.0

type GrpcIngress struct {
	Port        int         `json:"port"`
	Destination Destination `json:"destination"`
}

type HttpIngress added in v0.4.0

type HttpIngress struct {
	Context     string      `json:"context"`
	Version     string      `json:"version"`
	Global      bool        `json:"global"`
	Port        int         `json:"port"`
	Destination Destination `json:"destination"`
}

type Ingress added in v0.4.0

type Ingress struct {
	Extensions Extensions    `json:"extensions"`
	HTTP       []HttpIngress `json:"http"`
	GRPC       []GrpcIngress `json:"grpc"`
	TCP        []TcpIngress  `json:"tcp"`
}

type MetaData added in v0.4.0

type MetaData struct {
	CellImageName
	SchemaVersion       string                        `json:"schemaVersion"`
	Kind                string                        `json:"kind"`
	Components          map[string]*ComponentMetaData `json:"components"`
	BuildTimestamp      int64                         `json:"buildTimestamp"`
	BuildCelleryVersion string                        `json:"buildCelleryVersion"`
	ZeroScalingRequired bool                          `json:"zeroScalingRequired"`
	AutoScalingRequired bool                          `json:"autoScalingRequired"`
}

func ReadMetaData

func ReadMetaData(repo, organization, project, version string) (*MetaData, error)

type TcpIngress added in v0.4.0

type TcpIngress struct {
	Port        int         `json:"port"`
	Destination Destination `json:"destination"`
}

Jump to

Keyboard shortcuts

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