yaxc/internal/client/client.go
2021-03-28 16:33:51 +02:00

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,
}
}