Files
iris-context/commands/ops/fastly.go
VERSE ebde9ba68f refactor(commands): separate commands and its core into two folders (#32)
- I think it would be better if one for commands only, one for the spec
handling core logic so people won't be confused by the core logic inside
the commands folder (cleaner I guess)
- Regen docs
2026-07-05 11:27:30 +07:00

107 lines
8.1 KiB
Go

package ops
import (
"github.com/versenilvis/iris/spec"
)
func init() {
spec.Register(&spec.Spec{
Name: "fastly",
Description: "A CLI for interacting with the Fastly platform",
Subcommands: []spec.Subcommand{
{Name: "acl", Description: "Manipulate Fastly ACLs (Access Control Lists)"},
{Name: "create", Description: "Create a new ACL attached to the specified service version"},
{Name: "delete", Description: "Delete an ACL from the specified service version"},
{Name: "describe", Description: "Retrieve a single ACL by name for the version and service"},
{Name: "list", Description: "List ACLs"},
{Name: "update", Description: "Update an ACL for a particular service and version"},
{Name: "acl-entry", Description: "Manipulate Fastly ACL (Access Control List) entries"},
{Name: "auth-token", Description: "Manage API tokens for Fastly service users"},
{Name: "backend", Description: "Manipulate Fastly service version backends"},
{Name: "compute", Description: "Manage Compute@Edge packages"},
{Name: "build", Description: "Build a Compute@Edge package locally"},
{Name: "deploy", Description: "Deploy a package to a Fastly Compute@Edge service"},
{Name: "init", Description: "Initialize a new Compute@Edge package locally"},
{Name: "pack", Description: "Package a pre-compiled Wasm binary for a Fastly Compute@Edge service"},
{Name: "publish", Description: "Build and deploy a Compute@Edge package to a Fastly service"},
{Name: "serve", Description: "Build and run a Compute@Edge package locally"},
{Name: "validate", Description: "Validate a Compute@Edge package"},
{Name: "config", Description: "Display the Fastly CLI configuration"},
{Name: "dictionary", Description: "Manipulate Fastly edge dictionaries"},
{Name: "dictionary-item", Description: "Manipulate Fastly edge dictionary items"},
{Name: "domain", Description: "Manipulate Fastly service version domains"},
{Name: "healthcheck", Description: "Manipulate Fastly service version healthchecks"},
{Name: "ip-list", Description: "List Fastly's public IPs"},
{Name: "log-tail", Description: "Tail Compute@Edge logs"},
{Name: "logging", Description: "Manipulate Fastly service version logging endpoints"},
{Name: "azureblob", Description: "Manipulate Fastly service version Azure Blob Storage logging endpoints"},
{Name: "bigquery", Description: "Manipulate Fastly service version BigQuery logging endpoints"},
{Name: "cloudfiles", Description: "Manipulate Fastly service version Cloudfiles logging endpoints"},
{Name: "datadog", Description: "Manipulate Fastly service version Datadog logging endpoints"},
{Name: "digitalocean", Description: "Manipulate Fastly service version DigitalOcean Spaces logging endpoints"},
{Name: "elasticsearch", Description: "Manipulate Fastly service version Elasticsearch logging endpoints"},
{Name: "ftp", Description: "Manipulate Fastly service version FTP logging endpoints"},
{Name: "gcs", Description: "Manipulate Fastly service version GCS logging endpoints"},
{Name: "googlepubsub", Description: "Manipulate Fastly service version Google Cloud Pub/Sub logging endpoints"},
{Name: "heroku", Description: "Manipulate Fastly service version Heroku logging endpoints"},
{Name: "honeycomb", Description: "Manipulate Fastly service version Honeycomb logging endpoints"},
{Name: "https", Description: "Manipulate Fastly service version HTTPS logging endpoints"},
{Name: "kafka", Description: "Manipulate Fastly service version Kafka logging endpoints"},
{Name: "kinesis", Description: "Manipulate a Kinesis logging endpoint for a specific Fastly service version"},
{Name: "logentries", Description: "Manipulate Fastly service version Logentries logging endpoints"},
{Name: "loggly", Description: "Manipulate Fastly service version Loggly logging endpoints"},
{Name: "logshuttle", Description: "Manipulate Fastly service version Logshuttle logging endpoints"},
{Name: "newrelic", Description: "Manipulate a NewRelic logging endpoint for a specific Fastly service version"},
{Name: "openstack", Description: "Manipulate Fastly service version OpenStack logging endpoints"},
{Name: "papertrail", Description: "Manipulate Fastly service version Papertrail logging endpoints"},
{Name: "s3", Description: "Manipulate Fastly service version S3 logging endpoints"},
{Name: "scalyr", Description: "Manipulate Fastly service version Scalyr logging endpoints"},
{Name: "sftp", Description: "Manipulate Fastly service version SFTP logging endpoints"},
{Name: "splunk", Description: "Manipulate Fastly service version Splunk logging endpoints"},
{Name: "sumologic", Description: "Manipulate Fastly service version Sumologic logging endpoints"},
},
Options: []spec.Option{
{Name: "--name", Description: "'latest', 'active', or the number of a specific version"},
{Name: "--autoclone", Description: "If the selected service version is not editable, clone it and use the clone"},
{Name: "--service-id", Description: "Service ID (falls back to FASTLY_SERVICE_ID, then fastly.toml)"},
{Name: "--service-name", Description: "The name of the service"},
{Name: "--version", Description: "'latest', 'active', or the number of a specific version"},
{Name: "--json", Description: "Render output as JSON"},
{Name: "--new-name", Description: "The new name of the ACL"},
{Name: "--acl-id", Description: "Alphanumeric string identifying a ACL"},
{Name: "--ip", Description: "An IP address"},
{Name: "--comment", Description: "A freeform descriptive note"},
{Name: "--negated", Description: "Whether to negate the match"},
{Name: "--subnet", Description: "Number of bits for the subnet mask applied to the IP address"},
{Name: "--id", Description: "Alphanumeric string identifying an ACL Entry"},
{Name: "--direction", Description: "Direction in which to sort results"},
{Name: "--page", Description: "Page number of data set to fetch"},
{Name: "--per-page", Description: "Number of records per page"},
{Name: "--sort", Description: "Field on which to sort"},
{Name: "--file", Description: "Batch update json passed as file path or content, e.g. $(< batch.json)"},
{Name: "--password", Description: "User password corresponding with --token or $FASTLY_API_TOKEN"},
{Name: "--expires", Description: "Time-stamp (UTC) of when the token will expire"},
{Name: "--scope", Description: "Authorization scope (repeat flag per scope)"},
{Name: "--services", Description: "Revoke an API token"},
{Name: "--current", Description: "Revoke the token used to authenticate the request"},
{Name: "--customer-id", Description: "Alphanumeric string identifying the customer (falls back to FASTLY_CUSTOMER_ID)"},
{Name: "--address", Description: "A hostname, IPv4, or IPv6 address for the backend"},
{Name: "--port", Description: "Port number of the address"},
{Name: "--override-host", Description: "The hostname to override the Host header"},
{Name: "--connect-timeout", Description: "How long to wait for a timeout in milliseconds"},
{Name: "--max-conn", Description: "Maximum number of connections"},
{Name: "--first-byte-timeout", Description: "How long to wait for the first bytes in milliseconds"},
{Name: "--between-bytes-timeout", Description: "How long to wait between bytes in milliseconds"},
{Name: "--auto-loadbalance", Description: "Whether or not this backend should be automatically load balanced"},
{Name: "--weight", Description: "Weight used to load balance this backend against others"},
{Name: "--request-condition", Description: "Condition, which if met, will select this backend during a request"},
{Name: "--healthcheck", Description: "The name of the healthcheck to use with this backend"},
{Name: "--shield", Description: "Whether or not to use SSL to reach the backend"},
{Name: "--ssl-check-cert", Description: "Be strict on checking SSL certs"},
{Name: "--ssl-ca-cert", Description: "CA certificate attached to origin"},
{Name: "--ssl-client-cert", Description: "Client certificate attached to origin"},
{Name: "--ssl-client-key", Description: "Client key attached to origin"},
},
})
}