checks

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckDoc

type CheckDoc interface {
	GetName() string
	GetRisk() string
	GetShort() string
	GetDescription() string
	GetRemediation() []string
	GetTags() []string
	GetSupportedRepoTypes() []string
	GetDocumentationURL(commitish string) string
}

CheckDoc defines the documentation interface for a check.

type CheckDocImpl

type CheckDocImpl struct {
	// contains filtered or unexported fields
}

CheckDocImpl implementts `CheckDoc` interface and stores documentation about a check.

func (*CheckDocImpl) GetDescription

func (c *CheckDocImpl) GetDescription() string

GetDescription returns the full description of the check.

func (*CheckDocImpl) GetDocumentationURL

func (c *CheckDocImpl) GetDocumentationURL(commitish string) string

GetDocumentationURL returns the URL for the documentation of check `name`.

func (*CheckDocImpl) GetName

func (c *CheckDocImpl) GetName() string

GetName returns the name of the check.

func (*CheckDocImpl) GetRemediation

func (c *CheckDocImpl) GetRemediation() []string

GetRemediation returns the remediation of the check.

func (*CheckDocImpl) GetRisk

func (c *CheckDocImpl) GetRisk() string

GetRisk returns the risk of the check.

func (*CheckDocImpl) GetShort

func (c *CheckDocImpl) GetShort() string

GetShort returns the short description of the check.

func (*CheckDocImpl) GetSupportedRepoTypes

func (c *CheckDocImpl) GetSupportedRepoTypes() []string

GetSupportedRepoTypes returns the list of repo types the check supports.

func (*CheckDocImpl) GetTags

func (c *CheckDocImpl) GetTags() []string

GetTags returns the list of tags or the check.

type Doc

type Doc interface {
	GetCheck(name string) (CheckDoc, error)
	GetChecks() []CheckDoc
	CheckExists(name string) bool
}

Doc defines the documentation interface.

func Read

func Read() (Doc, error)

Read loads the checks' documentation.

type DocImpl

type DocImpl struct {
	// contains filtered or unexported fields
}

DocImpl implements `Doc` interface and contains checks' documentation.

func (DocImpl) CheckExists

func (d DocImpl) CheckExists(name string) bool

CheckExists returns whether the check `name` exists or not.

func (*DocImpl) GetCheck

func (d *DocImpl) GetCheck(name string) (CheckDoc, error)

GetCheck returns the information for check `name`.

func (*DocImpl) GetChecks

func (d *DocImpl) GetChecks() []CheckDoc

GetChecks returns the information for check `name`.

Directories

Path Synopsis
generate command
validate command

Jump to

Keyboard shortcuts

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