Documentation ¶
Index ¶
- Constants
- func DecodeReader(r io.Reader, dst proto.Message) error
- func DeviceName() string
- func EncodeWriter(src proto.Message, w io.Writer) (int, error)
- type Channel
- type Greet
- type LastMessage
- type Message
- func (m *Message) Duplicate(new *Message) bool
- func (m *Message) From() UniqueID
- func (m *Message) ID() UniqueID
- func (m *Message) Kind() proto.Message
- func (m *Message) RawData() []byte
- func (m *Message) Release()
- func (m *Message) WriteEncrypted(signer crypto.Signer, writer io.Writer) (int, error)
- type MetaData
- type UniqueID
Constants ¶
View Source
const ( Length = 4 MaxMessageSize = 16 << 20 )
todo: make these values customizable
Variables ¶
This section is empty.
Functions ¶
func DeviceName ¶ added in v1.0.3
func DeviceName() string
Types ¶
type Channel ¶ added in v1.0.3
type Channel chan *Message
Channel is an interface for managing clipboard data.
type Greet ¶
type Greet struct {
*types.GreetMessage
}
func NewGreetFromProto ¶
func NewGreetFromProto(m *types.GreetMessage) *Greet
type LastMessage ¶
LastMessage which is stored in Node and serves to identify duplicate messages
func NewLastMessage ¶
func NewLastMessage() *LastMessage
func (*LastMessage) Get ¶
func (m *LastMessage) Get() *Message
func (*LastMessage) ListenUpdates ¶
func (m *LastMessage) ListenUpdates()
ListenUpdates updates the lastMessage with the latest message received
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func MessageFrom ¶
MessageFrom creates a new Message with the provided data.
func MessageFromProto ¶
func ReceiveMessage ¶ added in v1.0.3
type MetaData ¶ added in v1.0.3
type MetaData struct {
// contains filtered or unexported fields
}
func MetaDataFromKind ¶ added in v1.0.3
func SelfMetaData ¶ added in v1.0.3
func SelfMetaData() *MetaData
Click to show internal directories.
Click to hide internal directories.