Documentation ¶
Index ¶
- Variables
- func ActivateVersion(c *cli.Context, client *fastly.Client, s *fastly.Service, v *fastly.Version) error
- func CheckFastlyKey(c *cli.Context) *cli.ExitError
- func CountChanges(diff *string) (int, int)
- func GetActiveVersion(service *fastly.Service) (uint, error)
- func GetDictionaryByName(client *fastly.Client, serviceName, dictName string) (*fastly.Dictionary, error)
- func GetDiffUrl(s *fastly.Service, from, to uint) *url.URL
- func GetFastlyKey() string
- func GetPager() *exec.Cmd
- func GetServiceByName(client *fastly.Client, name string) (*fastly.Service, error)
- func GetUnifiedDiff(c *fastly.Client, s *fastly.Service, from, to uint) (string, error)
- func IsInteractive() bool
- func Prompt(question string) (bool, error)
- func StringInSlice(check string, slice []string) bool
- func ValidateVersion(client *fastly.Client, service *fastly.Service, version uint) error
- func VersionsEqual(c *fastly.Client, s *fastly.Service, from, to uint) (bool, error)
Constants ¶
This section is empty.
Variables ¶
var ErrNonInteractive = errors.New("In non-interactive shell and --assume-yes not used.")
Functions ¶
func ActivateVersion ¶
func CountChanges ¶
func GetActiveVersion ¶
getActiveVersion takes in a *fastly.Service and spits out the config version that is currently active for that service.
func GetDictionaryByName ¶
func GetDiffUrl ¶
func GetFastlyKey ¶
func GetFastlyKey() string
func GetServiceByName ¶
func GetUnifiedDiff ¶
func IsInteractive ¶
func IsInteractive() bool
func StringInSlice ¶
func ValidateVersion ¶
validateVersion takes in a service and version number and returns an error if the version is invalid.
func VersionsEqual ¶
Returns true if two versions of a given service are identical. Generated VCL is not suitable as the ordering output of GeneratedVCL will vary if a no-op change has been made to a config (for example, removing and re-adding all domains). As such, this function generates a known-noop diff by comparing a version with itself, and then generating a diff between the from and to versions. If the two diffs are identical, then there is no difference between from and to.
Types ¶
This section is empty.