store

package
v0.0.0-...-e9a3055 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPasteExpired = errors.New("triangle/store: paste expired")
View Source
var ErrPasteNotFound = errors.New("triangle/store: paste not found")
View Source
var ErrWrongPassphrase = errors.New("triangle/store: wrong passphrase")

Functions

This section is empty.

Types

type Filesystem

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

func NewFilesystem

func NewFilesystem(rootPath, encryptionKey string) (*Filesystem, error)

func (*Filesystem) Close

func (f *Filesystem) Close() error

func (*Filesystem) DecryptPaste

func (f *Filesystem) DecryptPaste(id, passphrase string) (string, error)

func (*Filesystem) InsertPaste

func (f *Filesystem) InsertPaste(id, title, content, passphrase string, expiresAt *time.Time) (triangle.Paste, error)

func (*Filesystem) Paste

func (f *Filesystem) Paste(id string) (triangle.Paste, error)

type Store

type Store interface {
	Paste(id string) (triangle.Paste, error)
	InsertPaste(id, title, content, passphrase string, expiresAt *time.Time) (triangle.Paste, error)
	DecryptPaste(id, passphrase string) (string, error)
	Close() error
}

Jump to

Keyboard shortcuts

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