policytemplates

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package policytemplates provides ready-made profile snippets for common security controls. Each template is a complete, valid slice of profile TOML (policy rules, network allowlists, or host hardening) that a user can paste into a runeward profile instead of authoring policy from scratch.

The rendered TOML unmarshals cleanly into profile.Profile, so a template can be dropped straight into a profile file. Templates are addressed by a short, stable name; use Names to enumerate them and Render to obtain the body.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Names

func Names() []string

Names returns the template names in sorted order.

func Render

func Render(name string) (string, error)

Render returns the TOML body for the named template, ready to paste into a profile. It returns an error when the name is unknown.

Types

type Template

type Template struct {
	// Name is the short, stable identifier used to look the template up.
	Name string
	// Title is a one-line human label.
	Title string
	// Description explains what the snippet enforces and when to reach for it.
	Description string
	// TOML is the rendered profile body, with explanatory comments.
	TOML string
}

Template is a named, ready-to-paste profile snippet.

func All

func All() []Template

All returns every template, sorted by Name.

func Get

func Get(name string) (Template, bool)

Get returns the template registered under name. The bool is false when no such template exists.

Jump to

Keyboard shortcuts

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