This commit is contained in:
Adriano 2019-07-11 10:29:52 -07:00
Родитель 4b99fa18b3
Коммит 4d4891588d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: E4076F89EEEC8E28
6 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -81,7 +81,7 @@ func Register(auditor Auditor) {
auditors = append(auditors, auditor)
}
// Auditor is notified when noteworthy events happen, for example when a file is encrypted or decrypted.
// Auditor is notified when noteworthy events happen, for example when a file is encrypted or decrypted.
type Auditor interface {
Handle(event interface{})
}
@ -107,7 +107,7 @@ type PostgresAuditor struct {
DB *sql.DB
}
// NewPostgresAuditor is the constructor for a new PostgresAuditor object
// NewPostgresAuditor is the constructor for a new PostgresAuditor struct
// initialized with the given db connection string
func NewPostgresAuditor(connStr string) (*PostgresAuditor, error) {
db, err := sql.Open("postgres", connStr)

Просмотреть файл

@ -24,8 +24,8 @@ import (
"gopkg.in/urfave/cli.v1"
)
// ExampleFileEmitter represents actions needed for a struct to be comliant
// with the sops example-file emitter interface
// ExampleFileEmitter emits example files. This is used by the `sops` binary
// whenever a new file is created, in order to present the user with a non-empty file
type ExampleFileEmitter interface {
EmitExample() []byte
}

Просмотреть файл

@ -13,7 +13,7 @@ type GCSDestination struct {
gcsPrefix string
}
// NewGCSDestination is the constructor for a new Google Cloud Storage destination
// NewGCSDestination is the constructor for a Google Cloud Storage destination
func NewGCSDestination(gcsBucket string, gcsPrefix string) *GCSDestination {
return &GCSDestination{gcsBucket, gcsPrefix}
}
@ -23,7 +23,7 @@ func (gcsd *GCSDestination) Path(fileName string) string {
return fmt.Sprintf("gcs://%s/%s%s", gcsd.gcsBucket, gcsd.gcsPrefix, fileName)
}
// Upload uploads contents to a new file in GCS
// Upload uploads contents to a file in GCS
func (gcsd *GCSDestination) Upload(fileContents []byte, fileName string) error {
ctx := context.Background()
client, err := storage.NewClient(ctx)

Просмотреть файл

@ -15,7 +15,7 @@ type S3Destination struct {
s3Prefix string
}
// NewS3Destination is the constructor for a new S3 Destination
// NewS3Destination is the constructor for an S3 Destination
func NewS3Destination(s3Bucket string, s3Prefix string) *S3Destination {
return &S3Destination{s3Bucket, s3Prefix}
}
@ -25,7 +25,7 @@ func (s3d *S3Destination) Path(fileName string) string {
return fmt.Sprintf("s3://%s/%s%s", s3d.s3Bucket, s3d.s3Prefix, fileName)
}
// Upload uploads contents to a new file in an S3 Destination (bucket)
// Upload uploads contents to a file in an S3 Destination (bucket)
func (s3d *S3Destination) Upload(fileContents []byte, fileName string) error {
sess := session.Must(session.NewSession())
svc := s3.New(sess)

Просмотреть файл

@ -101,7 +101,7 @@ type TreeItem struct {
type TreeBranch []TreeItem
// TreeBranches is a collection of TreeBranch
// trees usually have more than one branch
// Trees usually have more than one branch
type TreeBranches []TreeBranch
func valueFromPathAndLeaf(path []interface{}, leaf interface{}) interface{} {

Просмотреть файл

@ -101,7 +101,7 @@ func (store Store) treeBranchToYamlMap(in sops.TreeBranch) yaml.MapSlice {
return branch
}
// LoadEncryptedFile loads the contexts of an encrypted yaml file onto a
// LoadEncryptedFile loads the contents of an encrypted yaml file onto a
// sops.Tree runtime object
func (store *Store) LoadEncryptedFile(in []byte) (sops.Tree, error) {
var data []yaml.MapSlice
@ -138,7 +138,7 @@ func (store *Store) LoadEncryptedFile(in []byte) (sops.Tree, error) {
}, nil
}
// LoadPlainFile loads the contexts of a plaintext yaml file onto a
// LoadPlainFile loads the contents of a plaintext yaml file onto a
// sops.Tree runtime obejct
func (store *Store) LoadPlainFile(in []byte) (sops.TreeBranches, error) {
var data []yaml.MapSlice