Versions in this module Expand all Collapse all v1 v1.0.48 May 8, 2018 Changes in this version + var ErrAbortOnPartMismatch = errors.New("local part mismatch, aborting upload") + var ErrPartNotFound = errors.New("part does not exist in stash") + func AssetFromMessage(ctx context.Context, g *globals.Context, uid gregor1.UID, ...) (res chat1.Asset, err error) + type AssetSource interface + Basename func() string + Close func() error + FileSize func() int + Open func(sessionID int, cli *keybase1.StreamUiClient) (ReadResetter, error) + type AttachmentInfo struct + EncKey signencrypt.SecretboxKey + ObjectKey string + Parts map[int]string + SignKey signencrypt.SignKey + StartedAt time.Time + VerifyKey signencrypt.VerifyKey + type AttachmentStash interface + Finish func(key StashKey) error + Lookup func(key StashKey) (AttachmentInfo, bool, error) + RecordPart func(key StashKey, partNumber int, hash string) error + Start func(key StashKey, info AttachmentInfo) error + type BufferSource struct + func (b *BufferSource) Basename() string + func (b *BufferSource) Bytes() []byte + func (b *BufferSource) Close() error + func (b *BufferSource) FileSize() int + func (b *BufferSource) Open(sessionID int, cli *keybase1.StreamUiClient) (ReadResetter, error) + type Decrypter interface + Decrypt func(ciphertext io.Reader, encKey, verifyKey []byte) (plaintext io.Reader) + DecryptWithNonce func(ciphertext io.Reader, nonce signencrypt.Nonce, encKey, verifyKey []byte) (plaintext io.Reader) + type Encrypter interface + Encrypt func(plaintext io.Reader) (ciphertext io.Reader, err error) + EncryptKey func() []byte + EncryptResume func(r io.Reader, nonce signencrypt.Nonce, encKey signencrypt.SecretboxKey, ...) (io.Reader, error) + EncryptWithNonce func(plaintext io.Reader, nonce signencrypt.Nonce) (ciphertext io.Reader, err error) + EncryptedLen func(size int) int + VerifyKey func() []byte + type ErrorWrapper struct + func NewErrorWrapper(prefix string, err error) *ErrorWrapper + func (e *ErrorWrapper) Details() string + func (e *ErrorWrapper) Error() string + type FileSource struct + func NewFileSource(s chat1.LocalFileSource) (*FileSource, error) + func (f *FileSource) Basename() string + func (f *FileSource) Close() error + func (f *FileSource) FileSize() int + func (f *FileSource) Open(sessionID int, cli *keybase1.StreamUiClient) (ReadResetter, error) + type FileStash struct + func NewFileStash(dir string) *FileStash + func (f *FileStash) Finish(key StashKey) error + func (f *FileStash) Lookup(key StashKey) (AttachmentInfo, bool, error) + func (f *FileStash) RecordPart(key StashKey, partNumber int, hash string) error + func (f *FileStash) Start(key StashKey, info AttachmentInfo) error + type PreviewRes struct + BaseDurationMs int + BaseHeight int + BaseWidth int + ContentType string + PreviewDurationMs int + PreviewHeight int + PreviewWidth int + Source *BufferSource + func Preview(ctx context.Context, log logger.Logger, src io.Reader, ...) (*PreviewRes, error) + type PutS3Result struct + Bucket string + Endpoint string + Path string + Region string + Size int64 + type ReadResetter interface + Reset func() error + type SignDecrypter struct + func NewSignDecrypter() *SignDecrypter + func (s *SignDecrypter) Decrypt(r io.Reader, encKey, verifyKey []byte) io.Reader + func (s *SignDecrypter) DecryptWithNonce(r io.Reader, nonce signencrypt.Nonce, encKey, verifyKey []byte) (plaintext io.Reader) + type SignEncrypter struct + func NewSignEncrypter() *SignEncrypter + func (s *SignEncrypter) Encrypt(r io.Reader) (io.Reader, error) + func (s *SignEncrypter) EncryptKey() []byte + func (s *SignEncrypter) EncryptResume(r io.Reader, nonce signencrypt.Nonce, encKey signencrypt.SecretboxKey, ...) (io.Reader, error) + func (s *SignEncrypter) EncryptWithNonce(r io.Reader, nonce signencrypt.Nonce) (io.Reader, error) + func (s *SignEncrypter) EncryptedLen(size int) int + func (s *SignEncrypter) SignKey() []byte + func (s *SignEncrypter) VerifyKey() []byte + type StashKey struct + ConversationID chat1.ConversationID + PlaintextHash []byte + UserID keybase1.UID + func NewStashKey(plaintextHash []byte, cid chat1.ConversationID, uid keybase1.UID) StashKey + func (s StashKey) String() string + type Store struct + func NewStore(logger logger.Logger, runtimeDir string) *Store + func (a *Store) DecryptAsset(ctx context.Context, w io.Writer, body io.Reader, asset chat1.Asset, ...) error + func (a *Store) DeleteAsset(ctx context.Context, params chat1.S3Params, signer s3.Signer, ...) error + func (a *Store) DeleteAssets(ctx context.Context, params chat1.S3Params, signer s3.Signer, ...) error + func (a *Store) DownloadAsset(ctx context.Context, params chat1.S3Params, asset chat1.Asset, w io.Writer, ...) error + func (a *Store) GetAssetReader(ctx context.Context, params chat1.S3Params, asset chat1.Asset, ...) (io.ReadCloser, error) + func (a *Store) PutS3(ctx context.Context, r io.Reader, size int64, task *UploadTask, ...) (*PutS3Result, error) + func (a *Store) UploadAsset(ctx context.Context, task *UploadTask) (chat1.Asset, error) + type StreamSource struct + func NewStreamSource(s chat1.LocalSource) *StreamSource + func (s *StreamSource) Basename() string + func (s *StreamSource) Close() error + func (s *StreamSource) FileSize() int + func (s *StreamSource) Open(sessionID int, cli *keybase1.StreamUiClient) (ReadResetter, error) + type UploadTask struct + ConversationID chat1.ConversationID + FileSize int + Filename string + Plaintext ReadResetter + Progress types.ProgressReporter + S3Params chat1.S3Params + S3Signer s3.Signer + UserID keybase1.UID + func (u *UploadTask) Nonce() signencrypt.Nonce Incompatible versions in this module v2.1.1+incompatible Jun 20, 2018 v2.1.0+incompatible Jun 20, 2018 v2.0.0+incompatible Jun 4, 2018