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) IncludePaths ¶ added in v1.10.0
func (e *EmptyResolver) IncludePaths() []string
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) IncludePaths ¶ added in v1.10.0
func (f *FileResolver) IncludePaths() []string
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 GlobResolver ¶ added in v1.6.0
type GlobResolver struct {
// contains filtered or unexported fields
}
GlobResolver is glob pattern factory resolver, will be used for formatter Note that GlobResolver does not want to include paths because formatter does not need to resolve included files
func (*GlobResolver) IncludePaths ¶ added in v1.10.0
func (g *GlobResolver) IncludePaths() []string
func (*GlobResolver) MainVCL ¶ added in v1.6.0
func (g *GlobResolver) MainVCL() (*VCL, error)
func (*GlobResolver) Name ¶ added in v1.6.0
func (g *GlobResolver) Name() string
func (*GlobResolver) Resolve ¶ added in v1.6.0
func (g *GlobResolver) Resolve(sttmt *ast.IncludeStatement) (*VCL, error)
type Resolver ¶
type Resolver interface { MainVCL() (*VCL, error) Resolve(stmt *ast.IncludeStatement) (*VCL, error) Name() string IncludePaths() []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 NewGlobResolver ¶ added in v1.6.0
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) IncludePaths ¶ added in v1.10.0
func (s *StaticResolver) IncludePaths() []string
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) IncludePaths ¶ added in v1.10.0
func (s *TerraformResolver) IncludePaths() []string
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.