secrets

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewParser added in v0.2.0

func NewParser(r FileReader) *parser

func NewWriter added in v0.2.0

func NewWriter(client ActionsClient, encryptor EncryptionWriter) *writer

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 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) ([]string, error)
}

type ManagementParams

type ManagementParams struct {
	Path string
}

type Parser added in v0.2.0

type Parser interface {
	Parse(path string) (map[string][]internal.Secret, error)
}

type SecretDefinition added in v0.2.0

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

type Service added in v0.2.0

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

func NewService added in v0.2.0

func NewService(writer Writer, parser Parser, spinner Spinner) *Service

func (*Service) RunManagement added in v0.2.0

func (s *Service) RunManagement(ctx context.Context, params ManagementParams) error

type Spinner added in v0.2.0

type Spinner interface {
	Start() error
	Message(msg string)
	Stop() error
	Fail() error
}

type Writer added in v0.2.0

type Writer interface {
	UpdateSecret(ctx context.Context, owner, repo string, secret internal.Secret) error
}

type YamlDefinition added in v0.2.0

type YamlDefinition struct {
	Secrets []SecretDefinition `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