regodocs

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 9 Imported by: 0

README

regodocs

Document Generator from Rego. This generates markdown files from annotations in rego files.

This tool aims to help documentation for conftest.

Install

# linux/macOS
curl -o regodocs -sL "https://github.com/wreulicke/regodocs/releases/download/v0.0.2/regodocs_0.0.2_$(uname -s | tr "[:upper:]" "[:lower:]")_$(uname -m)"
chmod +x regodocs
mv regodocs /usr/local/bin

# windows
TBD

Usage

$ regodocs generate
Generate documentation from Rego policy files

Usage:
  regodocs generate POLICY_PATH... [flags]

Flags:
  -h, --help              help for generate
  -o, --output string     output path for generated documentation
  -p, --pattern strings   pattern to filter files (default [deny.*,violation.*,warn.*])

Example

See testadata and also See generated document

License

MIT License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	GeneratorConfig *GeneratorConfig
}

func NewGenerator

func NewGenerator(c *GeneratorConfig) *Generator

func (*Generator) Generate

func (g *Generator) Generate(paths []string) error

type GeneratorConfig

type GeneratorConfig struct {
	OutputPath        string
	Patterns          []glob.Glob
	IgnoreFilePattern []glob.Glob
}

type Package added in v0.0.2

type Package struct {
	Name        string
	Description string
}

type Rule

type Rule struct {
	Name        string
	Description string
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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