kubesec

package
v0.0.0-...-9f46c4c Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubesecClient

type KubesecClient struct {
}

KubesecClient represent a client for kubesec.io.

func NewClient

func NewClient() *KubesecClient

NewClient returns a new client for kubesec.io.

func (*KubesecClient) ScanDefinition

func (kc *KubesecClient) ScanDefinition(def bytes.Buffer) (*KubesecResult, error)

ScanDefinition scans the provided resource definition.

type KubesecResult

type KubesecResult struct {
	Error   string `json:"error"`
	Score   int    `json:"score"`
	Scoring struct {
		Critical []struct {
			Selector string `json:"selector"`
			Reason   string `json:"reason"`
			Weight   int    `json:"weight"`
		} `json:"critical"`
		Advise []struct {
			Selector string `json:"selector"`
			Reason   string `json:"reason"`
			Href     string `json:"href,omitempty"`
		} `json:"advise"`
	} `json:"scoring"`
}

KubesecResult represents a result returned by kubesec.io.

func (*KubesecResult) Dump

func (r *KubesecResult) Dump(w io.Writer)

Dump writes the result in a human-readable format to the specified writer.

Jump to

Keyboard shortcuts

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