snippets

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TerraformBackendNameSanitizer

func TerraformBackendNameSanitizer(name string) string

Types

type Fetcher

type Fetcher interface {
	Backends() ([]*types.RemoteBackend, error)
	Directors() ([]*types.RemoteDirector, error)
	Dictionaries() ([]*types.RemoteDictionary, error)
	Acls() ([]*types.RemoteAcl, error)
	Snippets() ([]*types.RemoteVCL, error)
	LoggingEndpoints() ([]string, error)
}

type SnippetItem

type SnippetItem struct {
	Data string
	Name string
}

type Snippets

type Snippets struct {
	Dictionaries     []SnippetItem
	Acls             []SnippetItem
	Backends         []SnippetItem
	Directors        []SnippetItem
	ScopedSnippets   map[string][]SnippetItem
	IncludeSnippets  map[string]SnippetItem
	LoggingEndpoints map[string]struct{}
}

func Fetch

func Fetch(fetcher Fetcher) (*Snippets, error)

func (*Snippets) EmbedSnippets

func (s *Snippets) EmbedSnippets() []SnippetItem

func (*Snippets) FetchLoggingEndpoint

func (s *Snippets) FetchLoggingEndpoint(fetcher Fetcher) error

Fastly logging endpoints is not used on linting and interpreter, but we need to be able to factory all endpoints for future works. Fastly's logging endpoints API is divided for each services like BigQuery, S3, etc.. It means we need to make many API calls so implement as Snippets pointer method.

Jump to

Keyboard shortcuts

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