config

package
v0.0.0-...-430ebb6 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(c *Config, cfgFile string) error

func RestConfig

func RestConfig(overrides clientcmd.ConfigOverrides) (*rest.Config, error)

Types

type BasicAuth

type BasicAuth struct {
	Username  string `mapstructure:"username"`
	Password  string `mapstructure:"password"`
	SecretRef string `mapstructure:"secretRef"`
}

type Config

type Config struct {
	KubeConfig clientcmd.ConfigOverrides
	Namespace  string         `mapstructure:"namespace"`
	Logging    logging.Config `mapstructure:"logging"`
	Server     Server         `mapstructure:"server"`
	Local      bool           `mapstructure:"local"`
	CoreAPI    CoreAPI        `mapstructure:"core"`
}

type CoreAPI

type CoreAPI struct {
	Host        string    `mapstructure:"host"`
	SkipTLS     bool      `mapstructure:"skipTLS"`
	Certificate string    `mapstructure:"certificate"`
	SecretRef   string    `mapstructure:"secretRef"`
	BasicAuth   BasicAuth `mapstructure:"basicAuth"`
}

func (CoreAPI) FromValues

func (a CoreAPI) FromValues(values secrets.Values) CoreAPI

type Resolver

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

func NewResolver

func NewResolver(config *Config) Resolver

func (*Resolver) CVEClient

func (r *Resolver) CVEClient() (*cveawg.Client, error)

func (*Resolver) Clientset

func (r *Resolver) Clientset() (*k8s.Clientset, error)

func (*Resolver) CoreClient

func (r *Resolver) CoreClient(ctx context.Context) (*core.Client, error)

func (*Resolver) DynamicClient

func (r *Resolver) DynamicClient() (dynamic.Interface, error)

func (*Resolver) GHClient

func (r *Resolver) GHClient() *gh.Client

func (*Resolver) K8sConfig

func (r *Resolver) K8sConfig() (*rest.Config, error)

func (*Resolver) LoadBasicAuth

func (r *Resolver) LoadBasicAuth(ctx context.Context, secretRef string) (*BasicAuth, error)

func (*Resolver) Logger

func (r *Resolver) Logger() *zap.Logger

func (*Resolver) MetadataClient

func (r *Resolver) MetadataClient() (metadata.Interface, error)

func (*Resolver) SecretClient

func (r *Resolver) SecretClient() secrets.Client

func (*Resolver) Server

func (r *Resolver) Server(ctx context.Context, options []server.ServerOption) (*server.Server, error)

func (*Resolver) VulnrService

func (r *Resolver) VulnrService() (*vulnr.Service, error)

type Server

type Server struct {
	Port      int       `mapstructure:"port"`
	Debug     bool      `mapstructure:"debug"`
	BasicAuth BasicAuth `mapstructure:"basicAuth"`
}

Jump to

Keyboard shortcuts

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