checks

package
v3.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package checks contains documentation about checks.

Package checks contains documentation about checks.

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 added in v3.2.1

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
Package internal contains internal functions for reading input YAML file.
Package internal contains internal functions for reading input YAML file.

Jump to

Keyboard shortcuts

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