cmd

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: MIT Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NumProvidersShown = 10
	YamlFileMode      = 0o644
)
View Source
const (
	WaitBeforeExitSeconds = 3
	OSWindows             = "windows"
)
View Source
const JwtFilePermissions = 0o600
View Source
const ReadHeaderTimeoutSeconds = 3
View Source
const (
	ServerPort = 3535
)

Variables

View Source
var ErrBadInput = errors.New("bad input")
View Source
var (
	ErrFailedToGetTCPAddress = errors.New("failed to get TCP address")
)
View Source
var (
	ErrInvalidEventFormat = errors.New("invalid event format, expected 'provider.event'")
)

Functions

func DoLogout added in v1.0.5

func DoLogout(showLogs bool)

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type Destination added in v1.0.9

type Destination struct {
	// Id is the unique UUID identifier for the destination in Ampersand
	Id string `json:"id"`

	// Name is the human-readable name assigned to the destination (optional)
	Name string `json:"name"`

	// URL is the current webhook URL where events are sent
	URL string `json:"url"`

	// Type indicates the kind of destination, typically "webhook" for webhook destinations
	Type string `json:"type"` // Type of the destination (e.g., "webhook")
}

Destination represents a webhook destination in the Ampersand platform. It contains the essential information needed to identify and update a destination's URL.

func (Destination) NameOrId added in v1.0.9

func (d Destination) NameOrId() string

NameOrId returns the name of the destination if available, otherwise it falls back to the ID. This is useful for displaying destinations in user prompts or logs where a unique identifier is needed.

func (Destination) String added in v1.0.9

func (d Destination) String() string

String returns a human-readable representation of the destination. If a name is available, it returns "Name (ID)", otherwise just the ID. This method implements the Stringer interface for better display in prompts and logs.

Jump to

Keyboard shortcuts

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