Documentation ¶
Index ¶
- func AllTfCheckTypes() []string
- func CheckTfFmt(dir string) (bool, string)
- func CheckTfLint(dir string) (bool, string, *formatter.JSONOutput)
- func CheckTfValidate(dir string) (bool, string, *tfjson.ValidateOutput)
- func FixFmt(cloneDir string) error
- func InitTfLint()
- func TfLintRuleSeverityToAnnotationLevel(severity string) *string
- func TfValidateSeverityToAnnotationLevel(severity tfjson.DiagnosticSeverity) *string
- type TfCheck
- type TfCheckFields
- type TfCheckFmt
- func (t *TfCheckFmt) Annotations() (annotations []*github.CheckRunAnnotation)
- func (t *TfCheckFmt) FailureConclusion() githubv4.CheckConclusionState
- func (t *TfCheckFmt) FixAction() *github.CheckRunAction
- func (t *TfCheckFmt) Name() string
- func (t *TfCheckFmt) Run()
- func (t *TfCheckFmt) Type() TfCheckType
- type TfCheckTfLint
- func (t *TfCheckTfLint) Annotations() (annotations []*github.CheckRunAnnotation)
- func (t *TfCheckTfLint) FailureConclusion() githubv4.CheckConclusionState
- func (t *TfCheckTfLint) FixAction() *github.CheckRunAction
- func (t *TfCheckTfLint) Name() string
- func (t *TfCheckTfLint) Run()
- func (t *TfCheckTfLint) Type() TfCheckType
- type TfCheckType
- type TfCheckValidate
- func (t *TfCheckValidate) Annotations() (annotations []*github.CheckRunAnnotation)
- func (t *TfCheckValidate) FailureConclusion() githubv4.CheckConclusionState
- func (t *TfCheckValidate) FixAction() *github.CheckRunAction
- func (t *TfCheckValidate) Name() string
- func (t *TfCheckValidate) Run()
- func (t *TfCheckValidate) Type() TfCheckType
- type TfDir
- type TfDirConfigFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllTfCheckTypes ¶
func AllTfCheckTypes() []string
func CheckTfFmt ¶
func CheckTfLint ¶
func CheckTfLint(dir string) (bool, string, *formatter.JSONOutput)
func CheckTfValidate ¶
func CheckTfValidate(dir string) (bool, string, *tfjson.ValidateOutput)
func InitTfLint ¶
func InitTfLint()
InitTfLint goal is to launch tflint --init once at program startup.
func TfLintRuleSeverityToAnnotationLevel ¶
TfLintRuleSeverityToAnnotationLevel allows to convert tflint severity to github annotation level.
func TfValidateSeverityToAnnotationLevel ¶
func TfValidateSeverityToAnnotationLevel(severity tfjson.DiagnosticSeverity) *string
TfValidateSeverityToAnnotationLevel allows to convert terraform validate severity to github annotation level.
Types ¶
type TfCheck ¶
type TfCheck interface { Name() string Type() TfCheckType Run() Dir() string RelDir() string IsOK() bool Output() string FailureConclusion() githubv4.CheckConclusionState FixAction() *github.CheckRunAction Annotations() []*github.CheckRunAnnotation }
TfCheck interface defines all functions that should be present for any TfCheck.
func GetTfChecks ¶
func NewTfCheck ¶
func NewTfCheck(checkType TfCheckType, tfDir, relDir string) TfCheck
type TfCheckFields ¶
type TfCheckFields struct {
// contains filtered or unexported fields
}
func NewTfCheckFields ¶
func NewTfCheckFields(dir, relDir string) TfCheckFields
func (*TfCheckFields) Dir ¶
func (t *TfCheckFields) Dir() string
func (*TfCheckFields) IsOK ¶
func (t *TfCheckFields) IsOK() bool
func (*TfCheckFields) Output ¶
func (t *TfCheckFields) Output() string
func (*TfCheckFields) RelDir ¶
func (t *TfCheckFields) RelDir() string
type TfCheckFmt ¶
type TfCheckFmt struct {
TfCheckFields
}
func NewTfCheckFmt ¶
func NewTfCheckFmt(tfDir, relDir string) *TfCheckFmt
func (*TfCheckFmt) Annotations ¶
func (t *TfCheckFmt) Annotations() (annotations []*github.CheckRunAnnotation)
func (*TfCheckFmt) FailureConclusion ¶
func (t *TfCheckFmt) FailureConclusion() githubv4.CheckConclusionState
func (*TfCheckFmt) FixAction ¶
func (t *TfCheckFmt) FixAction() *github.CheckRunAction
func (*TfCheckFmt) Name ¶
func (t *TfCheckFmt) Name() string
func (*TfCheckFmt) Run ¶
func (t *TfCheckFmt) Run()
func (*TfCheckFmt) Type ¶
func (t *TfCheckFmt) Type() TfCheckType
type TfCheckTfLint ¶
type TfCheckTfLint struct { TfCheckFields // contains filtered or unexported fields }
func NewTfCheckTfLint ¶
func NewTfCheckTfLint(tfDir, relDir string) *TfCheckTfLint
func (*TfCheckTfLint) Annotations ¶
func (t *TfCheckTfLint) Annotations() (annotations []*github.CheckRunAnnotation)
func (*TfCheckTfLint) FailureConclusion ¶
func (t *TfCheckTfLint) FailureConclusion() githubv4.CheckConclusionState
func (*TfCheckTfLint) FixAction ¶
func (t *TfCheckTfLint) FixAction() *github.CheckRunAction
func (*TfCheckTfLint) Name ¶
func (t *TfCheckTfLint) Name() string
func (*TfCheckTfLint) Run ¶
func (t *TfCheckTfLint) Run()
func (*TfCheckTfLint) Type ¶
func (t *TfCheckTfLint) Type() TfCheckType
type TfCheckType ¶
type TfCheckType int64
TfCheckType defines the different possible terraform checks.
const ( Fmt TfCheckType = iota Validate TFLint )
func TfCheckTypeFromString ¶
func TfCheckTypeFromString(s string) TfCheckType
func (TfCheckType) String ¶
func (t TfCheckType) String() string
type TfCheckValidate ¶
type TfCheckValidate struct { TfCheckFields // contains filtered or unexported fields }
func NewTfCheckValidate ¶
func NewTfCheckValidate(tfDir, relDir string) *TfCheckValidate
func (*TfCheckValidate) Annotations ¶
func (t *TfCheckValidate) Annotations() (annotations []*github.CheckRunAnnotation)
func (*TfCheckValidate) FailureConclusion ¶
func (t *TfCheckValidate) FailureConclusion() githubv4.CheckConclusionState
func (*TfCheckValidate) FixAction ¶
func (t *TfCheckValidate) FixAction() *github.CheckRunAction
func (*TfCheckValidate) Name ¶
func (t *TfCheckValidate) Name() string
func (*TfCheckValidate) Run ¶
func (t *TfCheckValidate) Run()
func (*TfCheckValidate) Type ¶
func (t *TfCheckValidate) Type() TfCheckType
type TfDir ¶
type TfDir struct {
// contains filtered or unexported fields
}
func FindAllTfDir ¶
FindAllTfDir finds all of the terraform directory inside a directory.
type TfDirConfigFile ¶
type TfDirConfigFile struct {
Enabled bool `yaml:"enabled"`
}
Click to show internal directories.
Click to hide internal directories.