generators

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirExist

func DirExist(path string) (bool, error)

func FileExist

func FileExist(path string) (bool, error)

func InterpolateTemplate

func InterpolateTemplate(templateName string, params interface{}) (string, error)

func IsGitRepo

func IsGitRepo(path string) error

func WriteTemplateToFile

func WriteTemplateToFile(filePath, templateName string, params interface{}) error

Types

type General

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

func NewGeneral

func NewGeneral(path, policyName string, ui *clui.UI) *General

func (*General) Generate

func (g *General) Generate(overwrite bool) error

func (*General) GenerateFilesContent

func (g *General) GenerateFilesContent() (GeneratedFilesContent, error)

type GeneratedFilesContent

type GeneratedFilesContent map[string]string

type Generator

type Generator interface {
	Generate(overwrite bool) error
	GenerateFilesContent() (GeneratedFilesContent, error)
}

type Github

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

func NewGithub

func NewGithub(scc *SCC) *Github

func (*Github) Generate

func (g *Github) Generate(overwrite bool) error

func (*Github) GenerateFilesContent

func (g *Github) GenerateFilesContent() (GeneratedFilesContent, error)

type Gitlab

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

func NewGitlab

func NewGitlab(scc *SCC) *Gitlab

func (*Gitlab) Generate

func (g *Gitlab) Generate(overwrite bool) error

func (*Gitlab) GenerateFilesContent

func (g *Gitlab) GenerateFilesContent() (GeneratedFilesContent, error)

type Opa

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

func NewOpa

func NewOpa(path string, ui *clui.UI) *Opa

func (*Opa) Generate

func (o *Opa) Generate(overwrite bool) error

func (*Opa) GenerateFilesContent

func (o *Opa) GenerateFilesContent() (GeneratedFilesContent, error)

type SCC

type SCC struct {
	Path   string
	Server string
	Repo   string
	Token  string
	User   string
	UI     *clui.UI
}

Jump to

Keyboard shortcuts

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