config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigFileName = "config.json"
	ConfigFileDir  = ".ratify"
	PluginsFolder  = "plugins"
)

Variables

This section is empty.

Functions

func CreateFromConfig

Returns created referer store, verifier, policyprovider objects from config

func GetDefaultPluginPath

func GetDefaultPluginPath() string

func GetLoggerConfig

func GetLoggerConfig(configFilePath string) (logger.Config, error)

GetLoggerConfig returns logger configuration from config file at specified path.

func InitDefaultPaths

func InitDefaultPaths()

Types

type Config

type Config struct {
	StoresConfig    rsConfig.StoresConfig    `json:"store,omitempty"`
	PoliciesConfig  pcConfig.PoliciesConfig  `json:"policy,omitempty"`
	VerifiersConfig vfConfig.VerifiersConfig `json:"verifier,omitempty"`
	ExecutorConfig  exConfig.ExecutorConfig  `json:"executor,omitempty"`
	LoggerConfig    logger.Config            `json:"logger,omitempty"`
	// contains filtered or unexported fields
}

func Load

func Load(configFilePath string) (Config, error)

Load the config from file path provided, read from default path if configFilePath is empty

type GetExecutor

type GetExecutor func() *ef.Executor

func GetExecutorAndWatchForUpdate

func GetExecutorAndWatchForUpdate(configFilePath string) (GetExecutor, error)

Create a executor from configurationFile and setup config file watcher

Jump to

Keyboard shortcuts

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