Documentation ¶
Index ¶
- Constants
- func GetImageLabels(imageName string) (map[string]string, error)
- func ImageExists(imageName string) bool
- type CommandTest
- type CommandTests
- type Dependencies
- type Dependency
- type Env
- type Envs
- type FileContentTest
- type FileContentTests
- type FileExistenceTest
- type FileExistenceTests
- type MetadataTest
- type MetadataTests
- type Others
- type Port
- type Ports
- type Resources
- type Tags
Constants ¶
const ( // DEPENDENCY the dependencies tag DEPENDENCY = "DEPENDENCY" // ENVS the environment variables tag ENVS = "ENVS" // EXPOSED the exposed ports tag EXPOSED = "EXPOSED" // RESOURCES the used resources tag RESOURCES = "RESOURCES" // TAGS the extra tags used for our images TAGS = "TAGS" //COMMAND_TESTS command tests COMMAND_TESTS = "COMMAND_TESTS" //FILE_EXISTENCE_TESTS file existence tests FILE_EXISTENCE_TESTS = "FILE_EXISTENCE_TESTS" //FILE_CONTENT_TESTS file content tests FILE_CONTENT_TESTS = "FILE_CONTENT_TESTS" //METADATA_TESTS meta data tests METADATA_TESTS = "METADATA_TESTS" )
Variables ¶
This section is empty.
Functions ¶
func GetImageLabels ¶ added in v0.2.0
GetImageLabels asds
func ImageExists ¶ added in v0.2.0
ImageExists checks if a certain image exists in the local repo
Types ¶
type CommandTest ¶ added in v0.2.0
type CommandTest struct { Name string `json:"name,omitempty"` Command string `json:"command,omitempty"` Setup string `json:"setup,omitempty"` Args []string `json:"args,omitempty"` About string `json:"about,omitempty"` ExpectedOutput string `json:"expectedOutput,omitempty"` ExpectedError string `json:"expectedError,omitempty"` ExcludedOutput string `json:"excludedOutput,omitempty"` ExcludedError string `json:"excludedError,omitempty"` }
CommandTest a command container structure test
type CommandTests ¶ added in v0.2.0
type CommandTests []CommandTest
CommandTests array of command tests objects
func GetCommandTests ¶ added in v0.2.0
func GetCommandTests(dockerfile string) (*CommandTests, error)
GetCommandTests fetch the command tests from the Dockerfile
func GetImageCommandTests ¶ added in v0.2.0
func GetImageCommandTests(imageName string) (*CommandTests, error)
GetImageCommandTests fetch the command tests from the container image
type Dependencies ¶
type Dependencies []Dependency
Dependencies array of dependency objects
func GetDepenedencies ¶
func GetDepenedencies(dockerfile string) (*Dependencies, error)
GetDepenedencies fetch the container dependencies from the Dockerfile
func GetImageDepenedencies ¶ added in v0.2.0
func GetImageDepenedencies(imageName string) (*Dependencies, error)
GetImageDepenedencies fetch the container dependencies from the Dockerfile
type Dependency ¶
type Dependency struct { Name string `json:"name,omitempty"` Image string `json:"image,omitempty"` Ports []string `json:"ports,omitempty"` About string `json:"about,omitempty"` Mandatory string `json:"mandatory,omitempty"` }
Dependency object for the Dockerfile
type Env ¶
type Env struct { Name string `json:"name,omitempty"` About string `json:"about,omitempty"` Mandatory string `json:"mandatory,omitempty"` }
Env is the Environment Variable object for the Dockerfile
type Envs ¶
type Envs []Env
Envs array of environment variable objects
func GetImageEnvs ¶ added in v0.2.0
GetImageEnvs fetch cotnainer environment variables from the docker image
type FileContentTest ¶ added in v0.2.0
type FileContentTest struct { Name string `json:"name,omitempty"` Path string `json:"path,omitempty"` ExpectedContents string `json:"expectedContents,omitempty"` ExcludedContents string `json:"excludedContents,omitempty"` }
FileContentTest a file content container structure test
type FileContentTests ¶ added in v0.2.0
type FileContentTests []FileContentTest
FileContentTests array of file existence test objects
func GetFileContentTests ¶ added in v0.2.0
func GetFileContentTests(dockerfile string) (*FileContentTests, error)
GetFileContentTests fetches the me
func GetImageFileContentTests ¶ added in v0.2.0
func GetImageFileContentTests(imageName string) (*FileContentTests, error)
GetImageFileContentTests fetches the me
type FileExistenceTest ¶ added in v0.2.0
type FileExistenceTest struct { Name string `json:"name,omitempty"` Path string `json:"path,omitempty"` ShouldExist string `json:"shouldExist,omitempty"` Permissions string `json:"permissions,omitempty"` }
FileExistenceTest a file content container structure test
type FileExistenceTests ¶ added in v0.2.0
type FileExistenceTests []FileExistenceTest
FileExistenceTests array of file exsistence tests
func GetFileExistenceTests ¶ added in v0.2.0
func GetFileExistenceTests(dockerfile string) (*FileExistenceTests, error)
GetFileExistenceTests fetch the container file existence tests from the Dockerfile
func GetImageFileExistenceTests ¶ added in v0.2.0
func GetImageFileExistenceTests(imageName string) (*FileExistenceTests, error)
GetImageFileExistenceTests fetch the container file existence tests from the container Image
type MetadataTest ¶ added in v0.2.0
type MetadataTest struct { Env string `json:"env,omitempty"` ExposedPorts string `json:"exposedPorts,omitempty"` Volumes string `json:"volumes,omitempty"` EntryPoint string `json:"entrypoint,omitempty"` Cmd string `json:"cmd,omitempty"` Workdir string `json:"workdir,omitempty"` }
MetadataTest a test to make sure important meta-data exists in the container
type MetadataTests ¶ added in v0.2.0
type MetadataTests []MetadataTest
MetadataTests array of metadata tests
func GetImageMetadataTests ¶ added in v0.2.0
func GetImageMetadataTests(imageName string) (*MetadataTests, error)
GetImageMetadataTests fetches the image metadata tests from the container image
func GetMetadataTests ¶ added in v0.2.0
func GetMetadataTests(dockerfile string) (*MetadataTests, error)
GetMetadataTests fetches the me
type Others ¶
Others all other tags regardless of their type in the dockerfile
func GetOtherImageTags ¶ added in v0.2.0
GetOtherImageTags gets all the docker image labels
func GetOtherTags ¶
GetOtherTags gets all the dockerfile labels
type Port ¶
type Port struct { Name string `json:"name,omitempty"` About string `json:"about,omitempty"` Scheme string `json:"scheme,omitempty"` Protocol string `json:"protocol,omitempty"` }
Port is the exposed port object for the Dockerfile
type Ports ¶
type Ports []Port
Ports that should be exposed by the container application
func GetExposedPorts ¶
GetExposedPorts fetch the texposed ports from the Dockerfile
func GetImageExposedPorts ¶ added in v0.2.0
GetImageExposedPorts fetch the texposed ports from the docker image
type Resources ¶
Resources is the exposed port object for the Dockerfile (only one resource object per dockerfile )
func GetImageResources ¶ added in v0.2.0
GetImageResources fetch the container resources from the docker image
func GetResources ¶
GetResources fetch the container resources from the Dockerfile
type Tags ¶
Tags tags from dockerfile
func GetImageTags ¶ added in v0.2.0
GetImageTags fetch the tags used in the docker image