server

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultPort = 2850

Variables

This section is empty.

Functions

func ConvertLE

func ConvertLE(text, op string) string

ConvertLE is used to normaliza line endings when exchanging clipboard content.

func Serve

func Serve(ctx context.Context, port int, le string, pkeys map[[32]byte][32]byte, magic []byte, locked *int32) error

Serve handles backend rpc calls.

Types

type Clipboard

type Clipboard struct {
	// contains filtered or unexported fields
}

Clipboard is used to rpc clipboard content.

func NewClipboard

func NewClipboard(le string) *Clipboard

NewClipboard initializes Clipboard structure.

func (*Clipboard) Copy

func (c *Clipboard) Copy(text string, _ *struct{}) error

Copy is implementation of rpc "copy" command.

func (*Clipboard) Paste

func (c *Clipboard) Paste(_ struct{}, resp *string) error

Paste is implementation of rpc "paste" command.

type URI

type URI struct {
}

URI is used to rpc open command.

func NewURI

func NewURI() *URI

NewURI initializes URI structure.

func (*URI) Open

func (u *URI) Open(uri string, _ *struct{}) error

Open is implementation of "lemonade" rpc "open" command.

Jump to

Keyboard shortcuts

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