secrets

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionsClient

type ActionsClient interface {
	GetPublicKey(ctx context.Context, owner, repo string) ([]byte, string, error)
	AddOrUpdateSecret(ctx context.Context, owner, repo string, secret gh.SecretParams) error
}

type CLI

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

func NewSecretsCLI

func NewSecretsCLI(ghActions ActionsClient, reader FileReader, writer EncryptionWriter) *CLI

func (*CLI) RunManagement

func (cli *CLI) RunManagement(ctx context.Context, params ManagementParams) error

type Encrypt

type Encrypt struct {
}

func NewEncrypt

func NewEncrypt() Encrypt

func (Encrypt) Encrypt

func (e Encrypt) Encrypt(value string, pkey []byte) (string, error)

type EncryptionWriter

type EncryptionWriter interface {
	Encrypt(value string, pkey []byte) (string, error)
}

type FileReader

type FileReader interface {
	IsFile(path string) (bool, error)
	ReadFile(path string) ([]byte, error)
	ReadDir(path string) ([]os.FileInfo, error)
}

type ManagementParams

type ManagementParams struct {
	File string
}

type Secret

type Secret struct {
	Name  string   `yaml:"name"`
	Value string   `yaml:"value"`
	Repos []string `yaml:"repos"`
}

type Secrets

type Secrets struct {
	Secrets []Secret `yaml:"secrets"`
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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