kmstool

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2016 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(kmsApi kmsiface.KMSAPI, rawText string) (string, error)

func Encrypt

func Encrypt(kmsApi kmsiface.KMSAPI, keyId string, rawText string) (string, error)

func IsBase64

func IsBase64(b []byte) bool

func NewRegexpStringParser

func NewRegexpStringParser(r string) func(string) (map[string]string, error)

Types

type App

type App struct {
	*cli.App
	Client *kms.KMS
	Item   KMSItem
}

func NewApp

func NewApp() *App

func (*App) Before

func (s *App) Before(c *cli.Context) error

func (*App) CommandDecrypt

func (s *App) CommandDecrypt(c *cli.Context) error

func (*App) CommandEncrypt

func (s *App) CommandEncrypt(c *cli.Context) error

type KMSItem

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

func NewKMSItem

func NewKMSItem(content string) *KMSItem

func (*KMSItem) Content

func (s *KMSItem) Content() string

func (*KMSItem) Parse

func (s *KMSItem) Parse(parser func(content string) (parseMap map[string]string, err error)) error

func (*KMSItem) Replace

func (s *KMSItem) Replace(replacer func(content string, parsedHit string, parsedContent string) (newContent string, err error)) error

func (*KMSItem) RunOnParsed

func (s *KMSItem) RunOnParsed(command func(parsedHit string, parsedContent string) (content string, err error)) error

type NamedGroupRegexp

type NamedGroupRegexp struct {
	*regexp.Regexp
}

embed regexp.Regexp in a new type so we can extend it

func (*NamedGroupRegexp) FindAllByteSubmatchMap

func (r *NamedGroupRegexp) FindAllByteSubmatchMap(c string, n int) map[int]map[string]string

func (*NamedGroupRegexp) GetNamedGroupsFromMatch

func (r *NamedGroupRegexp) GetNamedGroupsFromMatch(match []string) map[string]string

Jump to

Keyboard shortcuts

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