Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶ added in v1.8.0
type Error struct { Severity ErrorSeverity Message string }
type ErrorSeverity ¶ added in v1.8.0
type ErrorSeverity int
const ( ERROR ErrorSeverity = iota + 1 WARNING INFO )
type LintStatement ¶ added in v1.8.0
type LintStatement interface { *ast.AclDeclaration | *ast.BackendDeclaration | *ast.DirectorDeclaration | *ast.TableDeclaration | *ast.SubroutineDeclaration | *ast.PenaltyboxDeclaration | *ast.RatecounterDeclaration | *ast.BlockStatement | *ast.ImportStatement | *ast.IncludeStatement | *ast.DeclareStatement | *ast.SetStatement | *ast.UnsetStatement | *ast.RemoveStatement | *ast.IfStatement | *ast.SwitchStatement | *ast.RestartStatement | *ast.EsiStatement | *ast.AddStatement | *ast.CallStatement | *ast.ErrorStatement | *ast.LogStatement | *ast.ReturnStatement | *ast.SyntheticStatement | *ast.SyntheticBase64Statement | *ast.GotoStatement | *ast.GotoDestinationStatement | *ast.FunctionCallStatement }
type LinterRequest ¶ added in v1.8.0
type LinterRequest[T LintStatement] struct { Statement T Arguments []string }
func ReadLinterRequest ¶ added in v1.8.0
func ReadLinterRequest[T LintStatement](r io.Reader) (*LinterRequest[T], error)
type LinterRequestError ¶ added in v1.8.0
type LinterRequestError struct {
Message string
}
func (*LinterRequestError) Error ¶ added in v1.8.0
func (e *LinterRequestError) Error() string
type LinterResponse ¶ added in v1.8.0
type LinterResponse struct {
Errors []*Error `json:"errors"`
}
func (*LinterResponse) Error ¶ added in v1.8.0
func (r *LinterResponse) Error(message string)
func (*LinterResponse) Info ¶ added in v1.8.0
func (r *LinterResponse) Info(message string)
func (*LinterResponse) Warning ¶ added in v1.8.0
func (r *LinterResponse) Warning(message string)
Click to show internal directories.
Click to hide internal directories.