Documentation
¶
Index ¶
- Constants
- Variables
- func GetGitClients() map[string]observe.GitClient
- func GetMatchingGitClient(repositoryURL string) (observe.GitClient, error)
- func GetMatchingGitClientFromMap(repositoryURL string, gitClients map[string]observe.GitClient) (observe.GitClient, error)
- func GetNeededObservers() []observe.Observer
- func GetObserversByConfigs(configs []BadgeConfig) []observe.Observer
- func GetSVG(key string) ([]byte, bool)
- func ParseConfig()
- func ResetCache()
- func SetGitClients(clients map[string]observe.GitClient)
- type BadgeConfig
- type CheckConfig
- type GitClientConfig
- type LevelConfig
- type RuntimeConfigType
- type ThresholdConfig
- type URLSaveSvgCache
Constants ¶
View Source
const API_PATH_PREFIX = "/api/v1" // nolint:staticcheck
Variables ¶
Functions ¶
func GetMatchingGitClient ¶
func GetMatchingGitClientFromMap ¶
func GetNeededObservers ¶
returns a map with a latent space key.
func GetObserversByConfigs ¶
func GetObserversByConfigs(configs []BadgeConfig) []observe.Observer
func ParseConfig ¶
func ParseConfig()
func ResetCache ¶
func ResetCache()
Types ¶
type BadgeConfig ¶
type BadgeConfig struct {
ID string `yaml:"id" json:"id"`
Name string `yaml:"name" json:"name"`
Description string `yaml:"description" json:"description"`
Levels []LevelConfig `yaml:"levels" json:"levels"`
}
type CheckConfig ¶
type CheckConfig struct {
Type string `yaml:"type" json:"type"`
Description string `yaml:"description" json:"description"`
Threshold ThresholdConfig `yaml:"threshold" json:"threshold"`
Key string `yaml:"key" json:"key"` // only defined for the manual check
DecisionJSONURL string `yaml:"DecisionJSONURL" json:"decisionURL"` // only defined for the manual check
DecisionJsonURL string `yaml:"decisionjsonurl" json:"decisionJsonUrl"` // nolint just because i messed up the yaml config - see the yaml tag for the DecisionJSONURL
GrundschutzConfig oscal.GrundschutzConfig `yaml:"grundschutz_config" json:"grundschutzConfig"` // only defined for GRUNDSCHUTZ_COMPLIANCE
}
func (CheckConfig) ObserverKey ¶
func (c CheckConfig) ObserverKey() string
func (CheckConfig) RuleID ¶
func (c CheckConfig) RuleID() string
type GitClientConfig ¶
type LevelConfig ¶
type LevelConfig struct {
Name string `yaml:"name" json:"name"`
SvgURL string `yaml:"svgurl" json:"svgUrl"`
NotNecessaryForNextHigherLevel *bool `yaml:"notnecessaryfornexthigherlevel" json:"notNecessaryForNextHigherLevel"`
Checks []CheckConfig `yaml:"checks" json:"checks"`
Description string `yaml:"description" json:"description"`
}
type RuntimeConfigType ¶
type RuntimeConfigType struct {
GitClients []GitClientConfig `yaml:"gitclients" json:"gitClients"`
Badges []BadgeConfig `yaml:"badges" json:"badges"`
PersonalEmailDomains []string `yaml:"personalemaildomains" json:"personalEmailDomains"`
RemoteConfigURL string `yaml:"remoteconfigurl" json:"remoteConfigUrl"`
SubsequentUseAPIDomain string `yaml:"subsequentuseapidomain" json:"subsequentUseApiDomain"`
}
var RuntimeConfig RuntimeConfigType
type ThresholdConfig ¶
type ThresholdConfig struct {
Min *int `yaml:"min" json:"min,omitempty"` // nil means no lower bound
Max *int `yaml:"max" json:"max,omitempty"` // nil means no upper bound
TimeRangeInMonths *int `yaml:"timerangeinmonths" json:"timeRangeInMonths,omitempty"`
}
func (ThresholdConfig) ID ¶
func (threshold ThresholdConfig) ID() string
type URLSaveSvgCache ¶
just a map which uses base64 encoded keys.
var URLSafeSvgCache URLSaveSvgCache = make(URLSaveSvgCache)
func (URLSaveSvgCache) Get ¶
func (s URLSaveSvgCache) Get(key string) ([]byte, bool)
func (URLSaveSvgCache) Set ¶
func (s URLSaveSvgCache) Set(value []byte) string
Source Files
¶
- config.go
- svg_cache.go
Click to show internal directories.
Click to hide internal directories.