Help us shape the future of Go! Take the 2026 Go Developer Survey

policies

package
v0.96.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewRegistryConfig

type NewRegistryConfig struct {
	Name    string
	Host    string
	Default bool
}

type PolicyProvider

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

PolicyProvider represents an external policy provider

func (*PolicyProvider) Resolve

func (p *PolicyProvider) Resolve(policyName string, token string) (*schemaapi.Policy, error)

Resolve calls the remote provider for retrieving a policy

type ProviderResponse

type ProviderResponse struct {
	Policy map[string]any `json:"policy"`
}

type Registry

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

Registry manages policy providers

func NewRegistry

func NewRegistry(conf ...*NewRegistryConfig) (*Registry, error)

func (*Registry) DefaultProvider

func (r *Registry) DefaultProvider() *PolicyProvider

func (*Registry) GetProvider

func (r *Registry) GetProvider(name string) *PolicyProvider

Jump to

Keyboard shortcuts

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