config

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 26 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 GetDefaultPluginVersion

func GetDefaultPluginVersion() string

returns default plugin version of 1.0.0

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(context.Context) *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