Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrEmptyMain = errors.New("Input file is empty")
)
Functions ¶
This section is empty.
Types ¶
type EmptyResolver ¶
type EmptyResolver struct{}
func (*EmptyResolver) MainVCL ¶
func (e *EmptyResolver) MainVCL() (*VCL, error)
func (*EmptyResolver) Name ¶
func (e *EmptyResolver) Name() string
func (*EmptyResolver) Resolve ¶
func (e *EmptyResolver) Resolve(stmt *ast.IncludeStatement) (*VCL, error)
type FileResolver ¶
type FileResolver struct {
// contains filtered or unexported fields
}
FileResolver is filesystem resolver, basically used for built vcl files
func (*FileResolver) MainVCL ¶
func (f *FileResolver) MainVCL() (*VCL, error)
func (*FileResolver) Name ¶
func (f *FileResolver) Name() string
func (*FileResolver) Resolve ¶
func (f *FileResolver) Resolve(stmt *ast.IncludeStatement) (*VCL, error)
type Resolver ¶
type Resolver interface { MainVCL() (*VCL, error) Resolve(stmt *ast.IncludeStatement) (*VCL, error) Name() string }
Resolver is an interface to fetch VCL source and dependencies from various sources e.g. file or JSON (terraform planned data)
func NewFileResolvers ¶
func NewTerraformResolver ¶
func NewTerraformResolver(services []*terraform.FastlyService) []Resolver
type StaticResolver ¶ added in v1.0.0
type StaticResolver struct {
// contains filtered or unexported fields
}
func NewStaticResolver ¶ added in v1.0.0
func NewStaticResolver(name, content string) *StaticResolver
func (*StaticResolver) MainVCL ¶ added in v1.0.0
func (s *StaticResolver) MainVCL() (*VCL, error)
func (*StaticResolver) Name ¶ added in v1.0.0
func (s *StaticResolver) Name() string
func (*StaticResolver) Resolve ¶ added in v1.0.0
func (s *StaticResolver) Resolve(stmt *ast.IncludeStatement) (*VCL, error)
type TerraformResolver ¶
TerraformResolver is in memory resolver, read and factory vcl data from terraform planned JSON input
func (*TerraformResolver) MainVCL ¶
func (s *TerraformResolver) MainVCL() (*VCL, error)
func (*TerraformResolver) Name ¶
func (s *TerraformResolver) Name() string
func (*TerraformResolver) Resolve ¶
func (s *TerraformResolver) Resolve(stmt *ast.IncludeStatement) (*VCL, error)
Click to show internal directories.
Click to hide internal directories.