clipm

package
v0.2.25 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CLIPBOARD_TBL = "clipboard"
)

Functions

func GetClipDb

func GetClipDb(logger *zerolog.Logger) (*db.Storage, error)

func Record

func Record() error

Types

type ByTimestamp

type ByTimestamp []ClipInfo

func (ByTimestamp) Len

func (a ByTimestamp) Len() int

func (ByTimestamp) Less

func (a ByTimestamp) Less(i, j int) bool

func (ByTimestamp) Swap

func (a ByTimestamp) Swap(i, j int)

type Clip

type Clip struct {
	ID      int
	Time    int64
	Content []byte
}

type ClipInfo

type ClipInfo struct {
	Application string `yaml:"application"`
	Timestamp   int64  `yaml:"timestamp"`
	Content     string `yaml:"content"`
	Hash        string `yaml:"-"`
	// Not supported for now
	Tag []string `yaml:"tag"`
}

func ClipboardList

func ClipboardList() (*ClipInfo, error)

type ClipInfos

type ClipInfos struct {
	Logger    *zerolog.Logger
	ClipInfos []ClipInfo `yaml:"clipinfos"`
}

func (*ClipInfos) Load

func (clipInfos *ClipInfos) Load(c interface{}) error

func (*ClipInfos) SortByTimestamp

func (clipInfos *ClipInfos) SortByTimestamp()

Jump to

Keyboard shortcuts

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