mirror of
https://github.com/darmiel/yaxc.git
synced 2025-09-06 14:35:57 +08:00
32 lines
472 B
Go
32 lines
472 B
Go
package client
|
|
|
|
import (
|
|
"errors"
|
|
"github.com/darmiel/yaxc/internal/api"
|
|
"sync"
|
|
"time"
|
|
)
|
|
|
|
var (
|
|
ErrEmptyHash = errors.New("empty hash")
|
|
ErrUnsupported = errors.New("clipboard unsupported")
|
|
)
|
|
|
|
type Check struct {
|
|
a *api.Api
|
|
mu sync.Mutex
|
|
path string
|
|
pass string
|
|
//
|
|
previousClipboard string
|
|
lastUpdate time.Time
|
|
}
|
|
|
|
func NewCheck(path, pass string) *Check {
|
|
return &Check{
|
|
a: api.API(),
|
|
mu: sync.Mutex{},
|
|
path: path,
|
|
pass: pass,
|
|
}
|
|
}
|