syspolicy
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package syspolicy contains the implementation of system policy management.Calling code should use the client interface intailscale.com/util/syspolicy/policyclient.
Index¶
Constants¶
This section is empty.
Variables¶
var (// ErrNotConfigured is returned when the requested policy setting is not configured.ErrNotConfigured =setting.ErrNotConfigured// ErrTypeMismatch is returned when there's a type mismatch between the actual type// of the setting value and the expected type.ErrTypeMismatch =setting.ErrTypeMismatch// ErrNoSuchKey is returned by [setting.DefinitionOf] when no policy setting// has been registered with the specified key.//// This error is also returned by a (now deprecated) [Handler] when the specified// key does not have a value set. While the package maintains compatibility with this// usage of ErrNoSuchKey, it is recommended to return [ErrNotConfigured] from newer// [source.Store] implementations.ErrNoSuchKey =setting.ErrNoSuchKey)
Functions¶
funcRegisterStore¶added inv1.78.0
func RegisterStore(namestring, scopesetting.PolicyScope, storesource.Store) (*rsop.StoreRegistration,error)
RegisterStore registers a new policysource.Store with the specified name andsetting.PolicyScope.
It is a shorthand forrsop.RegisterStore.
funcSelectControlURL¶
SelectControlURL returns the ControlURL to use based on a value inthe registry (LoginURL) and the one on disk (in the GUI'sprefs.conf). If both are empty, it returns a default value. (Italways return a non-empty value)
Seehttps://github.com/tailscale/tailscale/issues/2798 for some background.
Types¶
This section is empty.
Directories¶
| Path | Synopsis |
|---|---|
Package internal contains miscellaneous functions and types that are internal to the syspolicy packages. | Package internal contains miscellaneous functions and types that are internal to the syspolicy packages. |
loggerx Package loggerx provides logging functions to the rest of the syspolicy packages. | Package loggerx provides logging functions to the rest of the syspolicy packages. |
metrics Package metrics provides logging and reporting for policy settings and scopes. | Package metrics provides logging and reporting for policy settings and scopes. |
Package pkey defines the keys used to store system policies in the registry. | Package pkey defines the keys used to store system policies in the registry. |
Package policyclient contains the minimal syspolicy interface as needed by client code using syspolicy. | Package policyclient contains the minimal syspolicy interface as needed by client code using syspolicy. |
Package policytest contains test helpers for the syspolicy packages. | Package policytest contains test helpers for the syspolicy packages. |
Package ptype contains types used by syspolicy. | Package ptype contains types used by syspolicy. |
Package rsop facilitates source.Store registration via RegisterStore and provides access to the effective policy merged from all registered sources via PolicyFor. | Package rsop facilitates source.Store registration via RegisterStore and provides access to the effective policy merged from all registered sources via PolicyFor. |
Package setting contains types for defining and representing policy settings. | Package setting contains types for defining and representing policy settings. |
Package source defines interfaces for policy stores, facilitates the creation of policy sources, and provides functionality for reading policy settings from these sources. | Package source defines interfaces for policy stores, facilitates the creation of policy sources, and provides functionality for reading policy settings from these sources. |