juju: github.com/juju/juju/core/resources Index | Files

package resources

import "github.com/juju/juju/core/resources"


Package Files


func CheckDockerDetails Uses

func CheckDockerDetails(name string, details DockerImageDetails) error

CheckDockerDetails validates the provided resource is suitable for use.

func ValidateDockerRegistryPath Uses

func ValidateDockerRegistryPath(path string) error

ValidateDockerRegistryPath ensures the registry path is valid (i.e. api.jujucharms.com@sha256:deadbeef)

type DockerImageDetails Uses

type DockerImageDetails struct {
    // RegistryPath holds the path of the Docker image (including host and sha256) in a docker registry.
    RegistryPath string `json:"ImageName" yaml:"registrypath"`

    // Username holds the username used to gain access to a non-public image.
    Username string `json:"Username" yaml:"username"`

    // Password holds the password used to gain access to a non-public image.
    Password string `json:"Password,omitempty" yaml:"password"`

DockerImageDetails holds the details for a Docker resource type.

func UnmarshalDockerResource Uses

func UnmarshalDockerResource(data []byte) (DockerImageDetails, error)

UnmarshalDockerResource unmarshals the docker resource file from data.

Package resources imports 6 packages (graph) and is imported by 17 packages. Updated 2019-10-17. Refresh now. Tools for package owners.