khan

package module
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(add ...Item)

func AddFromSource

func AddFromSource(source string, add ...Item)

func Apply

func Apply() error

func RedError

func RedError(e error) string

func RedPrintln

func RedPrintln(s string)

func SetAssetLoader

func SetAssetLoader(fn func(string) (io.ReadCloser, error))

func SetDescribe

func SetDescribe(s string)

func SetSourcePrefix

func SetSourcePrefix(s string)

func Warnf

func Warnf(str string, args ...interface{})

Types

type Color

type Color int
const (
	Black Color = iota + 1
	Red
	Green
	Yellow
	Blue
	Magenta
	Cyan
	White
)

type File

type File struct {
	Path string `khan:"path,shortkey"`
	User User

	Mode os.FileMode

	// Content specifies a static string for the content of the file.
	Content string

	// Src is a path on the configurer for the source of the file.
	// This will be bundled into your khan build output.
	Src string `khan:"src,shortvalue"`

	// Local is a path on the configuree for the source of the file
	Local string

	// Template execution mode. Leave blank for no templating. Special
	// value "1" is the same as the default templating engine "pongo2",
	// a jinja2 style template engine. (See https://github.com/flosch/pongo2)
	Template string

	Delete bool
	// contains filtered or unexported fields
}

func (*File) StaticFiles

func (f *File) StaticFiles() []string

func (*File) String

func (f *File) String() string

func (*File) Validate

func (f *File) Validate() error

type Group

type Group struct {
	Name string
	Gid  int

	Delete bool
	// contains filtered or unexported fields
}

func (*Group) String

func (g *Group) String() string

type Item

type Item interface {
	String() string
	// contains filtered or unexported methods
}

type Package

type Package struct {
	Name string
}

type StaticFiler

type StaticFiler interface {
	StaticFiles() []string
}

type User

type User struct {
	Name string

	// Primary group. If not specified, user name is used
	Group string

	Uid int

	// Supplemental groups
	Groups []string

	Gecos string

	Home  string
	Shell string

	// Password is the passord encrypted with libcrypt.
	// Password if blank will actually be set to "!". If "!", "!!", or "x" are found
	// in /etc/shadow, it will be translated to a blank password. If you want an actually
	// blank password (not safe) use BlankPassword: true (blank_password: true in yaml).
	Password      string
	BlankPassword bool `khan:"blank_password"`

	Delete bool
	// contains filtered or unexported fields
}

func (*User) String

func (u *User) String() string

type Validator

type Validator interface {
	Validate() error
}

type VaultResponse added in v0.0.9

type VaultResponse struct {
	Data VaultResponseData
}

type VaultResponseData added in v0.0.9

type VaultResponseData struct {
	Data map[string]string
}

Directories

Path Synopsis
cmd
khan command
package rio is an abstraction for IO operations that may be performed locally, or remotely via golang.org/x/crypto/ssh.
package rio is an abstraction for IO operations that may be performed locally, or remotely via golang.org/x/crypto/ssh.

Jump to

Keyboard shortcuts

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