config

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package config loads veto.yaml. An unset key keeps the default.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandLine

type CommandLine []string

func (*CommandLine) UnmarshalYAML

func (c *CommandLine) UnmarshalYAML(node *yaml.Node) error

type Duration

type Duration time.Duration

func (*Duration) UnmarshalYAML

func (d *Duration) UnmarshalYAML(node *yaml.Node) error

type Expose added in v0.1.1

type Expose struct {
	Tags  []string `yaml:"tags"`
	Paths []string `yaml:"paths"`
}

Expose keeps operations that pass every configured key. Tags and paths are OR within each list.

type File

type File struct {
	Model           string            `yaml:"model"`
	ModelName       string            `yaml:"model_name"`
	ModelBaseURL    string            `yaml:"model_base_url"`
	Memory          string            `yaml:"memory"`
	Semantics       string            `yaml:"semantics"`
	SemanticsFile   string            `yaml:"semantics_file"`
	Policy          string            `yaml:"policy"`
	PolicyFile      string            `yaml:"policy_file"`
	PolicyBundle    string            `yaml:"policy_bundle"`
	Environment     string            `yaml:"environment"`
	TraceExport     string            `yaml:"trace_export"`
	FlowFile        string            `yaml:"flow_file"`
	AgentFile       string            `yaml:"agent_file"`
	RelationsFile   string            `yaml:"relations_file"`
	Contracts       []string          `yaml:"contracts"`
	Bundle          string            `yaml:"bundle"`
	Cases           []string          `yaml:"cases"`
	ReplayRedact    *bool             `yaml:"replay_redact"`
	TraceFile       string            `yaml:"trace_file"`
	Timeout         time.Duration     `yaml:"timeout"`
	Auth            Sources           `yaml:"auth"`
	TokenDir        string            `yaml:"token_dir"`
	Server          string            `yaml:"server"`
	Page            string            `yaml:"page"`
	ResponseFields  []string          `yaml:"response_fields"`
	ResponseLimit   int               `yaml:"response_limit"`
	InvokeLimit     int               `yaml:"invoke_limit"`
	Caller          string            `yaml:"caller"`
	Callers         map[string]string `yaml:"callers"`
	Confirmation    *bool             `yaml:"confirmation"`
	ApprovalTTL     time.Duration     `yaml:"approval_ttl"`
	ApprovalStore   string            `yaml:"approval_store"`
	ApprovalWebhook Webhook           `yaml:"approval_webhook"`
	ChatApproval    bool              `yaml:"chat_approval"`
	ReadOnly        bool              `yaml:"read_only"`
	Expose          Expose            `yaml:"expose"`
	Permissions     []string          `yaml:"permissions"`
	MemoryFile      string            `yaml:"memory_file"`
	JSON            string            `yaml:"json"`
}

func Defaults

func Defaults() File

func Load

func Load(path string) (File, error)

Relative paths are resolved from the config file.

func (*File) Confirms

func (f *File) Confirms() bool

Confirms reports whether this deployment keeps the confirmation gate. Unset means it does.

func (*File) JSONSet added in v0.1.5

func (f *File) JSONSet() jsonopts.Set

JSONSet is v2 when json is unset or v2. json: v1 is DefaultOptionsV1 for client APIs.

func (*File) Redact

func (f *File) Redact() bool

An unset key redacts.

type Source

type Source struct {
	Source                 string      `yaml:"source"`
	Env                    string      `yaml:"env"`
	ClientID               string      `yaml:"client_id"`
	ClientSecretEnv        string      `yaml:"client_secret_env"`
	AuthorizationURL       string      `yaml:"authorization_url"`
	TokenURL               string      `yaml:"token_url"`
	Issuer                 string      `yaml:"issuer"`
	DeviceAuthorizationURL string      `yaml:"device_authorization_url"`
	RedirectURL            string      `yaml:"redirect_url"`
	Scopes                 []string    `yaml:"scopes"`
	Audience               string      `yaml:"audience"`
	Header                 string      `yaml:"header"`
	Command                CommandLine `yaml:"command"`
	Timeout                Duration    `yaml:"timeout"`
	AuthToken              string      `yaml:"auth_token"`
	UserToken              string      `yaml:"user_token"`
	UserHeader             string      `yaml:"user_header"`
	Subject                string      `yaml:"subject"`
	SubjectTokenType       string      `yaml:"subject_token_type"`
}

func (Source) Kind

func (s Source) Kind() string

func (*Source) UnmarshalYAML

func (s *Source) UnmarshalYAML(node *yaml.Node) error

type Sources

type Sources map[string]Source

Sources maps an OpenAPI security scheme name to where its credential comes from. A string value is the environment variable for source env.

type Webhook

type Webhook struct {
	URL     string
	Command []string
}

Webhook is a command or an HTTP URL. It is called when a call is pending.

func (*Webhook) UnmarshalYAML

func (w *Webhook) UnmarshalYAML(node *yaml.Node) error

Jump to

Keyboard shortcuts

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