Documentation ¶
Index ¶
- Variables
- func AutoClone(ctx *cli.Context, g global.Data, sid string, v *fastly.Version) (sv int, err error)
- func GetActiveVersion(vs []*fastly.Version) (*fastly.Version, error)
- func GetSpecifiedVersion(vs []*fastly.Version, version string) (*fastly.Version, error)
- func MergeFlagsWithGlobal(flags []cli.Flag) []cli.Flag
- func NewCreateCmd(category string) *cli.Command
- func NewDeleteCmd(category string) *cli.Command
- func NewListCmd(category string) *cli.Command
- func NewReadCmd(category string) *cli.Command
- func NewUpdateCmd(category string) *cli.Command
- func ServiceDetails(ctx *cli.Context, g global.Data) (sid string, sv int, err error)
- func ServiceID(ctx *cli.Context, g global.Data) (sid string, err error)
- func ServiceVersion(ctx *cli.Context, g global.Data, sid string) (sv *fastly.Version, err error)
Constants ¶
This section is empty.
Variables ¶
var FlagAutoClone = &cli.BoolFlag{
Name: "autoclone",
Usage: "If the selected service version is not editable, clone it and use the clone",
}
FlagAutoClone is a commonly used flag.
var FlagCustomerID = &cli.StringFlag{ Name: "customer-id", Usage: fmt.Sprintf("Alphanumeric string identifying the customer (falls back to %s)", env.CustomerID), }
FlagCustomerID is a commonly used flag.
var FlagServiceID = &cli.StringFlag{ Name: "service-id", Usage: fmt.Sprintf("Service ID (falls back to %s, then fastly.toml)", env.ServiceID), }
FlagServiceID is a commonly used flag.
var FlagServiceName = &cli.StringFlag{
Name: "service-name",
Usage: "The name of the service",
}
FlagServiceName is a commonly used flag.
var FlagServiceVersion = &cli.StringFlag{
Name: "service-version",
Usage: "'latest', 'active', or the number of a specific Fastly service version",
}
FlagServiceVersion is a commonly used flag.
Functions ¶
func AutoClone ¶
AutoClone returns either the provided Service Version or an updated version. It will clone the service if the current version is either active or locked.
func GetActiveVersion ¶
GetActiveVersion returns the active service version.
func GetSpecifiedVersion ¶
GetSpecifiedVersion returns the specified service version.
func MergeFlagsWithGlobal ¶
func MergeFlagsWithGlobal(flags []cli.Flag) []cli.Flag
MergeFlagsWithGlobal merges command local flags with global flags. This is necessary as we can't create global flags with urfave/cli. So we provide a helper to make it easy to expose flags defined as global.
func NewCreateCmd ¶
func NewCreateCmd(category string) *cli.Command
NewCreateCmd returns a create action command with predefined settings.
func NewDeleteCmd ¶
func NewDeleteCmd(category string) *cli.Command
NewDeleteCmd returns a delete action command with predefined settings.
func NewListCmd ¶
func NewListCmd(category string) *cli.Command
NewListCmd returns a read action command with predefined settings.
func NewReadCmd ¶
func NewReadCmd(category string) *cli.Command
NewReadCmd returns a read action command with predefined settings.
func NewUpdateCmd ¶
func NewUpdateCmd(category string) *cli.Command
NewUpdateCmd returns a update action command with predefined settings.
func ServiceDetails ¶
ServiceDetails returns the Service ID and the version that should be used.
Types ¶
This section is empty.