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 ¶
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.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.