edgefunction

package
v0.0.0-...-2d90593 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorMandatoryCreateFlags            = errors.New("One or more required flags are missing. You must provide --active, --code, and --name flags when the --in flag is not provided. Run the command 'azion edge_function create --help' to display more information and try again")
	ErrorActiveFlag                      = errors.New("Invalid --active flag provided. The flag must have 'true' or 'false' values. Run the command 'azion edge_function <subcommand> --help' to display more information and try again")
	ErrorCodeFlag                        = errors.New("Failed to read the code file. Verify if the file name and its path are correct and the file content has a valid code format. Run the command 'azion edge_function <subcommand> --help' to display more information and try again")
	ErrorArgsFlag                        = errors.New("Failed to read the args file. Verify if the file name and its path are correct and the file's content has a valid JSON format. Run the command 'azion edge_function <subcommand> --help' to display more information and try again")
	ErrorParseArgs                       = errors.New("Failed to parse JSON args. Verify if the file's content has a valid JSON format. Run the command 'azion edge_function <subcommand> --help' to display more information and try again")
	ErrorCreateFunction                  = errors.New("Failed to create Edge Function: %s. Check your settings and try again. If the error persists, contact Azion support")
	ErrorMissingFunctionIdArgument       = errors.New("A required flag is missing. You must provide a function_id as an argument or path to import the file. Run the command 'azion edge_function <subcommand> --help' to display more information and try again")
	ErrorMissingFunctionIdArgumentDelete = errors.New("A required flag is missing. You must provide a function_id as an argument. Run the command 'azion edge_function <subcommand> --help' to display more information and try again")
	ErrorFailToDeleteFunction            = errors.New("Failed to delete the Edge Function: %s. Check your settings and try again. If the error persists, contact Azion support")
	ErrorGetFunction                     = errors.New("Failed to get the Edge Function: %s. Check your settings and try again. If the error persists, contact Azion support")
	ErrorGetFunctions                    = errors.New("Failed to list the Edge Functions: %s. Check your settings and try again. If the error persists, contact Azion support")
	ErrorUpdateFunction                  = errors.New("Failed to update the Edge Function: %s. Check your settings and try again. If the error persists, contact Azion support")
	ErrorConvertIdFunction               = errors.New("The function ID you provided is invalid. The value must be an integer. You may run the 'azion list edge-function' command to check your function ID")
)
View Source
var (
	// general
	Usage            = "edge-function"
	FileWritten      = "File successfully written to: %s\n"
	ShortDescription = "Manages your Azion account's Edge Functions"
	LongDescription  = "Manages serverless functions on the Edge Functions library"

	//create cmd
	CreateShortDescription = "Creates a new serverless Edge Function"
	CreateLongDescription  = "Creates an Edge Function based on given attributes to create a serverless code for Edge Applications"
	CreateOutputSuccess    = "Created Edge Function with ID %d"

	//delete cmd
	DeleteShortDescription = "Deletes an Edge Function"
	DeleteLongDescription  = "Removes an Edge Function from the Edge Functions library based on its given ID"
	DeleteOutputSuccess    = "Edge Function %d was successfully deleted"
	DeleteHelpFlag         = "Displays more information about the delete edge-function command"

	//describe cmd
	DescribeShortDescription   = "Returns the Edge Function data"
	DescribeLongDescription    = "Displays information about the Edge Function via a given ID to show the function’s attributes in detail"
	DescribeFlagOut            = "Exports the output to the given <file_path/file_name.ext>"
	DescribeFlagFormat         = "Changes the output format passing the json value to the flag"
	DescribeFlagWithCode       = "Displays the Edge Function's code; disabled by default"
	DescribeHelpFlag           = "Displays more information about the describe edge-function command"
	DescribeAskInputFunctionID = "Enter the ID of the Edge Function you wish to describe:"

	//list cmd
	ListShortDescription = "Displays your account's Edge Functions"
	ListLongDescription  = "Displays all functions in the user account’s Edge Functions library"
	ListHelpFlag         = "Displays more information about the list edge-function command"

	//update cmd
	UpdateShortDescription  = "Updates an Edge Function"
	UpdateLongDescription   = "Modifies an Edge Function based on its ID to update its name, activity status, code path, and other attributes"
	UpdateFlagName          = "The Edge Function's name"
	UpdateFlagCode          = "Path and name to the file containing the Edge Function's code"
	UpdateFlagActive        = "Whether the Edge Function should be active or not"
	UpdateFlagArgs          = "Path and name of the JSON file containing the Edge Function's arguments"
	UpdateFlagFile          = "Given path and JSON file to automatically update the Edge Function attributes; you can use - for reading from stdin"
	UpdateOutputSuccess     = "Updated Edge Function with ID %d"
	UpdateHelpFlag          = "Displays more information about the update edge-function command"
	UpdateAskEdgeFunctionID = "Enter the ID of the Edge Function you wish to update:"

	// flags
	FlagID         = "Unique identifier of the Edge Function"
	FlagName       = "The Edge Function's name"
	FlagCode       = "Path to the Edge Function's code"
	FlagActive     = "Whether the Edge Function is active or not"
	FlagArgs       = "Path to the Edge Function's arguments JSON file"
	FlagIn         = "Given file path to create an Edge Function; you can use - for reading from stdin"
	CreateFlagHelp = "Displays more information about the create edge-function command"

	// ask
	AskName           = "Enter the new Edge Function's name:"
	AskCode           = "Enter the file path of the Edge Function's source code:"
	AskActive         = "Select whether the Edge Function is active or not"
	AskEdgeFunctionID = "Enter the Edge Function's ID:"
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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