action_docker

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

This is the workflow action for calling an api

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Action_DockerRegDownloadImages

func Action_DockerRegDownloadImages(w *workflow.Workflow, m *workflow.TemplateData) error

func Action_DockerRegUploadImages

func Action_DockerRegUploadImages(w *workflow.Workflow, m *workflow.TemplateData) error

func GetSchema

func GetSchema() workflow.SchemaEndpoint

GetAction returns the action for the target

func ImageAccount

func ImageAccount(image string) string

docker.io/[circleci]/slim-base:latest

func ImageName

func ImageName(image string) string

docker.io/circleci/[slim-base]:latest

func ImageNameTag

func ImageNameTag(image string) string

docker.io/circleci/[slim-base:latest]

func ImageRegistry

func ImageRegistry(image string) string

docker.io/circleci/slim-base:latest

func ImageShortName

func ImageShortName(image string) string

docker.io/circleci/slim-base:latest

func ImageTag

func ImageTag(image string) string

docker.io/circleci/slim-base:[latest]

func RemapImage

func RemapImage(w *workflow.Workflow, image string, target_name string, no_tag bool, use_original bool, original string) string

Remap the docker image

func RemapImage2

func RemapImage2(w *workflow.Workflow, image string, target_name string, no_tag bool) string

Types

type DockerRegSchema

type DockerRegSchema struct {
}

func (DockerRegSchema) GetActionSchema

func (s DockerRegSchema) GetActionSchema() map[string]workflow.ActionSchema

GetActions returns the actions for this schema

func (DockerRegSchema) GetFunctionMap

func (s DockerRegSchema) GetFunctionMap() map[string]workflow.FunctionSchema

func (DockerRegSchema) GetTargetSchema

func (s DockerRegSchema) GetTargetSchema() map[string]workflow.TargetSchema

GetTargetSchema returns the target schema for this action

type DockerRegistryOption

type DockerRegistryOption func(*Registry)

K8Option is the option for the k8 connection

func OptionDockerRegHost

func OptionDockerRegHost(host string) DockerRegistryOption

OptionDockerRegHost is the option for the host

func OptionDockerRegIgnoreSSL

func OptionDockerRegIgnoreSSL(ignore_ssl bool) DockerRegistryOption

OptionDockerRegIgnoreSSL is the option for the ignore ssl

func OptionDockerRegPassword

func OptionDockerRegPassword(password string) DockerRegistryOption

OptionDockerRegPassword is the option for the password

func OptionDockerRegUser

func OptionDockerRegUser(user string) DockerRegistryOption

OptionDockerRegUser is the option for the user

type Manifest

type Manifest []struct {
	Config   string   `json:"Config"`
	RepoTags []string `json:"RepoTags"`
	Layers   []string `json:"Layers"`
}

type Registry

type Registry struct {
	Host      string `json:"host" yaml:"host"  flag:"host h" desc:"the host url"`
	UserName  string `json:"user" yaml:"user" flag:"user u" desc:"Username for the registry"`
	Password  string `json:"password" yaml:"password" flag:"password p" desc:"Password for the registry"`
	IgnoreSSL bool   `json:"ignore_ssl" yaml:"ignore_ssl"  flag:"ignore_ssl i" desc:"Ignore SSL"`
	Library   string `json:"library" yaml:"library" flag:"library l" desc:"Library to use"`
}

func CreateDockerRegistry

func CreateDockerRegistry(host string, UserName string, Password string, library string, IgnoreSSL bool) (*Registry, error)

Function to create the Registry struct

func (*Registry) Download

func (m *Registry) Download(config string, save_name string) error

Upload the image from the docker Registry

func (*Registry) GetImageNameTag

func (m *Registry) GetImageNameTag(image_path string) (string, error)

func (*Registry) String

func (m *Registry) String() string

String returns the string representation of the k8 type

func (*Registry) Update

func (m *Registry) Update(opts ...DockerRegistryOption)

Update the k8 Type with the options

func (*Registry) Upload

func (m *Registry) Upload(image_path string, log_level int64) (string, error)

Upload the image to docker Registry

Jump to

Keyboard shortcuts

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