Documentation
¶
Index ¶
- type Bore
- func (b *Bore) Clipboard() *clipboardNamespace
- func (b *Bore) Close() error
- func (b *Bore) Collections() *collectionNamespace
- func (b *Bore) Config() (*Config, error)
- func (b *Bore) DB() (*bun.DB, error)
- func (b *Bore) Events() (*events.Manager, error)
- func (b *Bore) Get(ctx context.Context, options GetClipboardOptions) (PasteResult, error)
- func (b *Bore) Repository() (repository.Repository, error)
- func (b *Bore) Reset() error
- func (b *Bore) SystemClipboard() (clipboard.NativeClipboard, error)
- type Config
- type CreateCollectionOptions
- type CreateCollectionResult
- type GetClipboardOptions
- type ListCollectionsOptions
- type PasteResult
- type SetClipboardOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bore ¶
type Bore struct {
// contains filtered or unexported fields
}
func (*Bore) Clipboard ¶
func (b *Bore) Clipboard() *clipboardNamespace
Clipboard returns the items namespace for managing clipboard items.
func (*Bore) Collections ¶
func (b *Bore) Collections() *collectionNamespace
func (*Bore) Get ¶
func (b *Bore) Get(ctx context.Context, options GetClipboardOptions) (PasteResult, error)
Get retrieves the last copied data from the Bore instance.
func (*Bore) Repository ¶
func (b *Bore) Repository() (repository.Repository, error)
Repository returns the current repository implementation for the current Bore instance.
func (*Bore) SystemClipboard ¶
func (b *Bore) SystemClipboard() (clipboard.NativeClipboard, error)
SystemClipboard returns the native clipboard interface for the current platform.
type Config ¶
type Config struct {
// DataDir is the path to the storage directory.
DataDir string `toml:"data_dir" json:"data_dir"`
// ClipboardPassthrough enables passing the bore clipboard data to the native clipboard on copy
ClipboardPassthrough bool `toml:"clipboard_passthrough" json:"clipboard_passthrough"`
// DefaultCollection is the name of the default collection to use when none is specified
DefaultCollection string `toml:"default_collection" json:"default_collection"`
}
NOTE: where and show the configuration is stored is determined by the application layer.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default configuration for the bore application.
func (*Config) FromBytes ¶
FromBytes reads the configuration from a byte slice and populates the Config struct.
func (*Config) SetDefaultCollection ¶
type CreateCollectionOptions ¶
type CreateCollectionResult ¶
type GetClipboardOptions ¶
type GetClipboardOptions struct {
ItemID string // Optional item identifier to filter pasted items.
CollectionID string // Optional collection ID to filter pasted items.
FromSystemClipboard bool // Whether to paste from the system clipboard if available.
DeleteAfterPaste bool // Whether to delete the pasted item after pasting.
SkipCollectionCheck bool // Whether to skip checking if the collection exists.
}
type ListCollectionsOptions ¶
type ListCollectionsOptions struct {
OrderBy []repository.OrderBy
Pagination *repository.Pagination
}
type PasteResult ¶
Click to show internal directories.
Click to hide internal directories.