Documentation
¶
Index ¶
- func CheckClose(v interface{})
- func FindFiles(fs FileSystem, root string, re string) ([]string, error)
- func SummaryBuilder(conftestResults ConftestResults) (string, string)
- func UnZip(source string, destination string) error
- type ConftestResults
- type File
- type FileSystem
- type HTTPClient
- type OSFS
- func (OSFS) Copy(dst io.Writer, src io.Reader) (int64, error)
- func (OSFS) Create(name string) (File, error)
- func (OSFS) NewFile(fd uintptr, name string) File
- func (OSFS) Open(name string) (File, error)
- func (OSFS) ReadFile(filename string) ([]byte, error)
- func (OSFS) Remove(name string) error
- func (OSFS) RemoveAll(name string) error
- func (OSFS) Stat(name string) (os.FileInfo, error)
- func (OSFS) Walk(root string, walkFn filepath.WalkFunc) error
- func (OSFS) WriteFile(filename string, data []byte, perm os.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindFiles ¶ added in v0.0.43
func FindFiles(fs FileSystem, root string, re string) ([]string, error)
FindFiles - Recursively search for files matching a pattern.
func SummaryBuilder ¶ added in v0.0.75
func SummaryBuilder(conftestResults ConftestResults) (string, string)
SummaryBuilder - Builds the summary for the check run.
Types ¶
type ConftestResults ¶ added in v0.0.74
type ConftestResults []struct {
Filename string `json:"filename"`
Successes int `json:"successes,omitempty"`
Failures []struct {
Msg string `json:"msg"`
Metadata struct {
// contains filtered or unexported fields
} `json:"metadata,omitempty"`
} `json:"failures,omitempty"`
Warnings []struct {
Msg string `json:"msg"`
Metadata struct {
// contains filtered or unexported fields
} `json:"metadata,omitempty"`
} `json:"warnings,omitempty"`
}
ConftestResults - Holds conftest results
func Scan ¶ added in v0.0.68
func Scan(fs FileSystem, rootPath string, policyID string, files []string) ConftestResults
Scan - Use conftest to Scan discovered files.
type File ¶ added in v0.1.1
type File interface {
io.Closer
io.Writer
io.Reader
io.ReaderAt
io.Seeker
Stat() (os.FileInfo, error)
}
File interface
type FileSystem ¶ added in v0.1.2
type FileSystem interface {
Open(name string) (File, error)
Copy(dst io.Writer, src io.Reader) (int64, error)
Create(name string) (File, error)
Remove(name string) error
RemoveAll(name string) error
Stat(name string) (os.FileInfo, error)
Walk(root string, walkFn filepath.WalkFunc) error
ReadFile(filename string) ([]byte, error)
WriteFile(filename string, data []byte, perm os.FileMode) error
NewFile(fd uintptr, name string) File
}
FileSystem - Interface
type HTTPClient ¶ added in v0.1.7
HTTPClient - HTTP Client
func NewHTTPClient ¶ added in v0.1.7
func NewHTTPClient(http *http.Client, url string) *HTTPClient
NewHTTPClient - Returns new HTTPClient
func (*HTTPClient) DownloadFile ¶ added in v0.1.7
func (c *HTTPClient) DownloadFile(fs FileSystem) (string, error)
DownloadFile - Download a file from a URL
type OSFS ¶ added in v0.0.38
type OSFS struct{}
OSFS implements fileSystem using the local disk.
Click to show internal directories.
Click to hide internal directories.