cred

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 5 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aws

type Aws struct {
	Id              string `json:",omitempty"`
	Key             string `json:",omitempty"`
	Secret          string `json:",omitempty"`
	EncryptedSecret string `json:",omitempty"`
	Region          string `json:",omitempty"`
}

Aws represents AWS credentials

func (*Aws) Cipher

func (b *Aws) Cipher(ctx context.Context, key *kms.Key) error

Cipher ciphers password to encrypted password, clears password after that

func (*Aws) Decipher

func (b *Aws) Decipher(ctx context.Context, key *kms.Key) error

Decipher deciphers EncryptedPassword or returns error

type Basic

type Basic struct {
	Email             string `json:",omitempty"`
	Username          string `json:",omitempty"`
	Password          string `json:",omitempty"`
	EncryptedPassword string `json:",omitempty"`
}

Basic represents basic credentials

func (*Basic) Cipher

func (b *Basic) Cipher(ctx context.Context, key *kms.Key) error

Cipher ciphers password to encrypted password, clears password after that

func (*Basic) Decipher

func (b *Basic) Decipher(ctx context.Context, key *kms.Key) error

Decipher deciphers EncryptedPassword or returns error

type Generic

type Generic struct {
	SSH
	JwtConfig
	Aws
}

Generic represents generic credentials

func (*Generic) Cipher

func (g *Generic) Cipher(ctx context.Context, key *kms.Key) error

func (*Generic) Decipher

func (g *Generic) Decipher(ctx context.Context, key *kms.Key) error

type JwtConfig

type JwtConfig struct {
	ClientEmail             string   `json:"client_email,omitempty"`
	TokenURL                string   `json:"token_url,omitempty"`
	PrivateKey              string   `json:"private_key,omitempty"`
	PrivateKeyID            string   `json:"private_key_id,omitempty"`
	ProjectID               string   `json:"project_id,omitempty"`
	TokenURI                string   `json:"token_uri,omitempty"`
	Type                    string   `json:"type,omitempty"`
	ClientX509CertURL       string   `json:"client_x509_cert_url,omitempty"`
	AuthProviderX509CertURL string   `json:"auth_provider_x509_cert_url,omitempty"`
	Scopes                  []string `json:",omitempty"`
	// contains filtered or unexported fields
}

JwtConfig represents jws config

type SHA1

type SHA1 struct {
	Key                   string `json:",omitempty"`
	EncryptedKey          string `json:",omitempty"`
	IntegrityKey          string `json:",omitempty"`
	EncryptedIntegrityKey string `json:",omitempty"`
}

SHA1 represents sha1 key secrets

func (*SHA1) Cipher

func (b *SHA1) Cipher(ctx context.Context, key *kms.Key) error

Cipher ciphers password to encrypted password, clears password after that

func (*SHA1) Decipher

func (b *SHA1) Decipher(ctx context.Context, key *kms.Key) error

Decipher deciphers EncryptedPassword or returns error

type SSH

type SSH struct {
	Basic
	PrivateKeyPassword          string `json:",omitempty"`
	EncryptedPrivateKeyPassword string `json:",omitempty"`
}

SSH represents SSH config

func (*SSH) Cipher

func (b *SSH) Cipher(ctx context.Context, key *kms.Key) error

Cipher ciphers sensitive data or error

func (*SSH) Decipher

func (b *SSH) Decipher(ctx context.Context, key *kms.Key) error

Decipher deciphers sensitive data or error

Jump to

Keyboard shortcuts

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