setup

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Address         string
	Name            string
	OverrideHost    string
	Port            uint
	SSLCertHostname string
	SSLSNIHostname  string
}

Backend represents the configuration parameters for creating a backend via the API client.

type Backends

type Backends struct {
	// Public
	APIClient      api.Interface
	AcceptDefaults bool
	Progress       text.Progress
	ServiceID      string
	ServiceVersion int
	Setup          map[string]*manifest.SetupBackend
	Stdin          io.Reader
	Stdout         io.Writer
	// contains filtered or unexported fields
}

Backends represents the service state related to backends defined within the fastly.toml setup configuration.

NOTE: It implements the setup.Interface interface.

func (*Backends) Configure

func (b *Backends) Configure() error

Configure prompts the user for specific values related to the service resource.

func (*Backends) Create

func (b *Backends) Create() error

Create calls the relevant API to create the service resource(s).

func (*Backends) Predefined

func (b *Backends) Predefined() bool

Predefined indicates if the service resource has been specified within the fastly.toml file using a setup configuration block.

type Dictionaries added in v0.40.0

type Dictionaries struct {
	// Public
	APIClient      api.Interface
	AcceptDefaults bool
	Progress       text.Progress
	ServiceID      string
	ServiceVersion int
	Setup          map[string]*manifest.SetupDictionary
	Stdin          io.Reader
	Stdout         io.Writer
	// contains filtered or unexported fields
}

Dictionaries represents the service state related to dictionaries defined within the fastly.toml setup configuration.

NOTE: It implements the setup.Interface interface.

func (*Dictionaries) Configure added in v0.40.0

func (d *Dictionaries) Configure() error

Configure prompts the user for specific values related to the service resource.

func (*Dictionaries) Create added in v0.40.0

func (d *Dictionaries) Create() error

Create calls the relevant API to create the service resource(s).

func (*Dictionaries) Predefined added in v0.40.0

func (d *Dictionaries) Predefined() bool

Predefined indicates if the service resource has been specified within the fastly.toml file using a setup configuration block.

type Dictionary added in v0.40.0

type Dictionary struct {
	Name  string
	Items []DictionaryItem
}

Dictionary represents the configuration parameters for creating a dictionary via the API client.

NOTE: WriteOnly (i.e. private) dictionaries not supported.

type DictionaryItem added in v0.40.0

type DictionaryItem struct {
	Key   string
	Value string
}

Dictionary represents the configuration parameters for creating dictionary items via the API client.

type Domain

type Domain struct {
	Name string
}

Domain represents the configuration parameters for creating a domain via the API client.

type Domains

type Domains struct {
	// Public
	APIClient      api.Interface
	AcceptDefaults bool
	PackageDomain  string
	Progress       text.Progress
	ServiceID      string
	ServiceVersion int
	Stdin          io.Reader
	Stdout         io.Writer
	// contains filtered or unexported fields
}

Domains represents the service state related to domains defined within the fastly.toml setup configuration.

NOTE: It implements the setup.Interface interface.

func (*Domains) Configure

func (d *Domains) Configure() error

Configure prompts the user for specific values related to the service resource.

NOTE: If --domain flag is used we'll use that as the domain to create.

func (*Domains) Create

func (d *Domains) Create() error

Create calls the relevant API to create the service resource(s).

func (*Domains) Missing

func (d *Domains) Missing() bool

Missing indicates if there are missing resources that need to be created.

func (*Domains) Predefined

func (d *Domains) Predefined() bool

Predefined indicates if the service resource has been specified within the fastly.toml file using a setup configuration block.

NOTE: Domains are not configurable via the fastly.toml setup and so this becomes a no-op function that returned a canned response.

func (*Domains) Validate

func (d *Domains) Validate() error

Validate checks if the service has the required resources.

NOTE: It should set an internal `missing` field (boolean) accordingly so that the Missing() method can report the state of the resource.

type Interface

type Interface interface {
	// Configure prompts the user for specific values related to the service resource.
	Configure() error

	// Create calls the relevant API to create the service resource(s).
	Create() error

	// Missing indicates if there are missing resources that need to be
	// configured and/or created.
	Missing() bool

	// Predefined indicates if the service resource has been specified within the
	// fastly.toml file using a [setup] configuration block.
	Predefined() bool

	// Validate checks if the service has the required resources.
	Validate() error
}

Interface represents the behaviour of a setup resource.

type Logger added in v0.41.0

type Logger struct {
	Provider string
}

Logger represents the configuration parameters for creating a dictionary via the API client.

type Loggers added in v0.41.0

type Loggers struct {
	AcceptDefaults bool
	Setup          map[string]*manifest.SetupLogger
	Stdout         io.Writer
}

Loggers represents the service state related to log entries defined within the fastly.toml setup configuration.

NOTE: It implements the setup.Interface interface.

func (*Loggers) Configure added in v0.41.0

func (l *Loggers) Configure() error

Configure prompts the user for specific values related to the service resource.

func (*Loggers) Predefined added in v0.41.0

func (l *Loggers) Predefined() bool

Predefined indicates if the service resource has been specified within the fastly.toml file using a setup configuration block.

Jump to

Keyboard shortcuts

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