config

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmbedConfig []byte

Functions

This section is empty.

Types

type Config

type Config struct {
	// Providers represents the providers to be scanned by cloudgrep
	Providers []Provider `yaml:"providers"`
	// Datastore is the datastore to be used
	Datastore Datastore `yaml:"datastore"`
	// Web is the web specs to be used
	Web Web `yaml:"web"`
	// Adding regions as where cli regions override will be stored
	Regions []string
}

Config represents all the user-configurable settings for cloudgrep. One such structure is loaded at runtime and is populated through the cli arguments, user-provider config file, or a preset default, with values resolved in that order of precedence. To see the default, please refer to https://github.com/run-x/cloudgrep/blob/main/pkg/config/config.yaml

func GetDefault added in v0.0.10

func GetDefault() (Config, error)

type Datastore

type Datastore struct {
	// Type is the kind of datastore to be used by cloudgrep (currently only supports SQLite)
	Type string `yaml:"type"`
	// SkipRefresh determines whether to refresh the data (i.e. scan the cloud) on startup.
	SkipRefresh bool `yaml:"skipRefresh"`
	// DataSourceName is the Type-specific data source name or uri for connecting to the desired data source
	DataSourceName string `yaml:"dataSourceName"`
}

Datastore represents the specs cloudgrep uses for creating and/or connecting to the datastore/database used.

type Provider

type Provider struct {
	// Cloud is the type of the cloud provider (currently only AWS is supported)
	Cloud string `yaml:"cloud"`
	// Regions is the list of different regions within the cloud provider to scan
	Regions []string `yaml:"regions"`
}

Provider represents a cloud provider cloudgrep will scan w/ the current credentials

func (*Provider) String added in v0.0.11

func (p *Provider) String() string

type Web

type Web struct {
	// Host is the host the server is running as
	Host string `yaml:"host"`
	// Port is the port the server is running in
	Port int `yaml:"port"`
	// Prefix is the url prefix the server uses
	Prefix string `yaml:"prefix"`
	// SkipOpen determines whether to automatically open the webui on startup
	SkipOpen bool `yaml:"skipOpen"`
}

Web represents the specs cloudgrep uses for creating the webapp server

Jump to

Keyboard shortcuts

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