safety

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGloballyDisabled = errors.New("action disabled globally")
	ErrPluginDisabled   = errors.New("action disabled for plugin")
)

Functions

func GlobalKeygenKey

func GlobalKeygenKey() string

func GlobalKeysignKey

func GlobalKeysignKey() string

func IsDisabledError

func IsDisabledError(err error) bool

func KeygenFlagKey

func KeygenFlagKey(pluginID string) string

func KeysignFlagKey

func KeysignFlagKey(pluginID string) string

Types

type ControlFlag

type ControlFlag struct {
	Key     string `json:"key"`
	Enabled bool   `json:"enabled"`
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(db Storage, logger *logrus.Logger) *Manager

func (*Manager) EnforceKeysign

func (m *Manager) EnforceKeysign(ctx context.Context, pluginID string) error

type Storage

type Storage interface {
	GetControlFlags(ctx context.Context, k1, k2 string) (map[string]bool, error)
	UpsertControlFlags(ctx context.Context, flags []ControlFlag) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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