Documentation ¶
Index ¶
- Variables
- func DEBUGPrintf(format string, args ...interface{})
- func DEBUGPrintln(msg string)
- func DecodeForHuman(human string) ([]byte, error)
- func EncodeForHuman(bindata []byte) string
- func GetSourceLocation() string
- func RecvSecret(bucket, bucketRegion string, key []byte, destDir string, newName *string, ...) (*FileMetadata, *RecvError)
- type Decrypter
- type Encrypter
- type ErrorResponse
- type FileMetadata
- type ProgressRecord
- type RecvError
- type RecvErrorType
- type SendError
- type SendErrorType
- type ServerVersionResponse
- type UploadRequest
- type UploadResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( APIVersion = 3 DEBUG = false BadBlockSizeError = errors.New("Block size is >256? WTF?") ShortReadError = errors.New("Read was truncated, but then read more data! This should never happen!") NotEnoughKeyRandomnessError = errors.New("Not enough random bytes for key! This should never happen!") NotEnoughIVRandomnessError = errors.New("Not enough random bytes for IV! This should never happen!") DataCorruptionError = errors.New("Encrypted data is corrupt!") EncrypterWeirdEOFError = errors.New("Encrypter: Read 0 bytes with no EOF!") DecrypterWeirdEOFError = errors.New("Decrypter: Read 0 bytes with no EOF!") // We use a custom base-64 encoding because: // // * '/' and '=' tend to introduce line breaks or breaks in text selection // * '/' is the path separator in S3 Encoding = base64.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxzy0123456789+_").WithPadding(base64.NoPadding) )
View Source
var GitCommit string
View Source
var SourceUrlPrefix = "https://github.com/waucka/secretshare"
View Source
var Version string
Functions ¶
func DEBUGPrintf ¶
func DEBUGPrintf(format string, args ...interface{})
func DEBUGPrintln ¶
func DEBUGPrintln(msg string)
func DecodeForHuman ¶
Decodes binary data from the ASCII format
func EncodeForHuman ¶
Encodes binary data for human copy/pasting.
func GetSourceLocation ¶
func GetSourceLocation() string
func RecvSecret ¶
func RecvSecret(bucket, bucketRegion string, key []byte, destDir string, newName *string, overwrite bool, progressChan chan *ProgressRecord) (*FileMetadata, *RecvError)
Types ¶
type Decrypter ¶
type Decrypter struct {
// contains filtered or unexported fields
}
Decrypter implements io.Reader and allows you to read out a decrypted version of a stream.
func NewDecrypter ¶
type Encrypter ¶
type Encrypter struct { TotalSize int64 // contains filtered or unexported fields }
Encrypter implements io.Reader and allows you to read out an encrypted version of a stream.
func NewEncrypter ¶
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
type FileMetadata ¶
type ProgressRecord ¶
type RecvError ¶
type RecvError struct { Message string Code RecvErrorType }
type RecvErrorType ¶
type RecvErrorType int
const ( MetadataDownloadFailed RecvErrorType = iota MalformedMetadata RecvFileExists RecvCreateFailed DataDownloadFailed DecryptionFailed )
type SendErrorType ¶
type SendErrorType int
const ( MetadataUploadFailed SendErrorType = iota ConnectionFailed ServerFailed DataUploadFailed EncryptionFailed KeyGenFailed FileOpenFailed FileReadFailed UniverseFailed )
type ServerVersionResponse ¶
type UploadRequest ¶
Click to show internal directories.
Click to hide internal directories.