models

package
v0.0.0-...-4eb878b Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

func LoadAuth

func LoadAuth(name string) (*Auth, error)

func (*Auth) IsEmpty

func (a *Auth) IsEmpty() bool

type DockerRegistry

type DockerRegistry struct {
	AuthName string `json:"auth" mapstructure:"auth"`
	Name     string
	URL      string `json:"url"` // This is not at all confusing.

	Image string
	Tag   string
	// contains filtered or unexported fields
}

func LoadDockerRegistry

func LoadDockerRegistry(path string) (registry *DockerRegistry, err error)

func (*DockerRegistry) AuthToken

func (dr *DockerRegistry) AuthToken() (string, error)

DockerRegistry.Auth returns the auth token from the remote registry

func (*DockerRegistry) ContentDigest

func (dr *DockerRegistry) ContentDigest() (string, error)

DockerRegistry.ContentDigest returns the (usually) sha256 encoded hash for the selected manifest.

func (*DockerRegistry) DockerUrl

func (dr *DockerRegistry) DockerUrl() string

DockerRegistry.DockerUrl returns a docker formatted url. That is basically just a url without the scheme at the beginning.

func (*DockerRegistry) HasImage

func (dr *DockerRegistry) HasImage(image string) bool

DockerRegistry.HasImage searches through the images in the registry and returns true if found, false if not.

func (*DockerRegistry) HasTag

func (dr *DockerRegistry) HasTag(image string, tag string) bool

func (*DockerRegistry) Images

func (dr *DockerRegistry) Images() ([]string, error)

DockerRegistry.Images returns the list of images on the registry.

func (*DockerRegistry) SelectImage

func (dr *DockerRegistry) SelectImage() error

DockerRegistry.SelectImage will present all the images from registry to the user and allow them to pick one using a fuzzyfinder.

func (*DockerRegistry) SelectTag

func (dr *DockerRegistry) SelectTag() error

DockerRegistry.SelectTag will present all the tags for a given image to the user and allow them to pick one using a fuzzyfinder.

func (*DockerRegistry) Tags

func (dr *DockerRegistry) Tags(image string) ([]string, error)

func (*DockerRegistry) UpdateURL

func (dr *DockerRegistry) UpdateURL()

func (*DockerRegistry) Url

func (dr *DockerRegistry) Url() url.URL

type DockerTransfer

type DockerTransfer struct {
	From DockerRegistry
	To   DockerRegistry
}

func (*DockerTransfer) Process

func (dt *DockerTransfer) Process(out *streams.Out, debug bool) (bool, error)

type JWT

type JWT struct {
	Parent *NamespaceConfig
	Check  string
	Issuer string
	Secret string

	Payload map[string]interface{}
	// contains filtered or unexported fields
}

func (*JWT) Generate

func (j *JWT) Generate(ttl time.Duration) (signed string, err error)

func (*JWT) IsValid

func (j *JWT) IsValid() bool

func (*JWT) Parse

func (j *JWT) Parse() (err error)

type NamespaceConfig

type NamespaceConfig struct {
	Tenant      string
	Environment string
	JWT         map[string]JWT `json:"jwt,omitempty"`
}

type VaultConfig

type VaultConfig struct {
	Address string `json:"address"`
	Token   string `json:"token"`
}

Jump to

Keyboard shortcuts

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