deploy

package
v0.0.0-...-059d9f2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 35 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DeployURL = "https://console.azion.com"
	ScriptID  = "17ac912d-5ce9-4806-9fa7-480779e43f58"
)

Variables

View Source
var (
	Jobs    chan contracts.FileOps
	Retries int64
)
View Source
var ResponseMap map[string]string

Functions

func CreateZipsInBatches

func CreateZipsInBatches(files []contracts.FileOps) error

CreateZipsInBatches Function to split files into batches of up to 1MB and create ZIPs keeping the directory structure

func NewCmd

func NewCmd(f *cmdutil.Factory) *cobra.Command

func NewCobraCmd

func NewCobraCmd(deploy *DeployCmd) *cobra.Command

func ReadAllFiles

func ReadAllFiles(pathStatic string, cmd *DeployCmd) ([]contracts.FileOps, error)

func ReadZip

func ReadZip() ([]contracts.FileOps, error)

ReadZip reads the ZIP files in the pathStatic directory that start with prefix and end with .zip. Returns a list of contracts.FileOps or an error.

func Worker

func Worker(jobs <-chan contracts.FileOps, results chan<- error, currentFile *int64, clientUpload aws.Config, bucket, prefix string)

worker reads the range of jobs and uploads the file, if there is an error during upload, we returning it through the results channel

Types

type DeployCmd

type DeployCmd struct {
	Io                    *iostreams.IOStreams
	GetWorkDir            func() (string, error)
	FileReader            func(path string) ([]byte, error)
	WriteFile             func(filename string, data []byte, perm fs.FileMode) error
	GetAzionJsonContent   func(pathConfig string) (*contracts.AzionApplicationOptionsV3, error)
	WriteAzionJsonContent func(conf *contracts.AzionApplicationOptionsV3, confConf string) error
	BuildCmd              func(f *cmdutil.Factory) *build.BuildCmd
	Open                  func(name string) (*os.File, error)
	FilepathWalk          func(root string, fn filepath.WalkFunc) error
	F                     *cmdutil.Factory
	Unmarshal             func(data []byte, v interface{}) error
	Interpreter           func() *manifestInt.ManifestInterpreter
	VersionID             func() string
	CallScript            func(token string, id string, secret string, prefix string, name string, confDir string, cmd *DeployCmd) (string, error)
	OpenBrowser           func(f *cmdutil.Factory, urlConsoleDeploy string, cmd *DeployCmd) error
	CaptureLogs           func(execId string, token string, cmd *DeployCmd) error
	CheckToken            func(f *cmdutil.Factory) error
	ReadSettings          func(string) (token.Settings, error)
	UploadFiles           func(f *cmdutil.Factory, conf *contracts.AzionApplicationOptionsV3, msgs *[]string, pathStatic, bucket string, cmd *DeployCmd, settings token.Settings) error
	OpenBrowserFunc       func(input string) error
	Auto                  bool
	DryRun                bool
	Env                   string
	Local                 bool
	NoPrompt              bool
	Path                  string
	ProjectConf           string
	SkipBuild             bool
	Sync                  bool
	AliasEnv              bool
	Logs                  contracts.Logs
	Result                contracts.Results
}

func NewDeployCmd

func NewDeployCmd(f *cmdutil.Factory) *DeployCmd

func (*DeployCmd) ExternalRun

func (cmd *DeployCmd) ExternalRun(f *cmdutil.Factory, configPath string, local bool, sync bool, aliasEnv bool) error

func (*DeployCmd) Run

func (cmd *DeployCmd) Run(f *cmdutil.Factory) error

type Response

type Response struct {
	UUID  string    `json:"uuid"`
	Image string    `json:"image"`
	Start time.Time `json:"start"`
}

Response represents the structure of the response from the API.

Jump to

Keyboard shortcuts

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