cli

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

README

Etherpad client

This is the Etherpad client known in the original Etherpad as Etherpad cli client. The arguments changed so please run ./etherpad-go cli --help to see the available options.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunFromCLI

func RunFromCLI(logger *zap.SugaredLogger, args []string)

Types

type Pad

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

func Connect

func Connect(host string, logger *zap.SugaredLogger) *Pad

func NewPad

func NewPad(host, padId string, conn *websocket.Conn, logger *zap.SugaredLogger) *Pad

func (*Pad) Append

func (p *Pad) Append(text string)

func (*Pad) Close

func (p *Pad) Close()

func (*Pad) On

func (p *Pad) On(event string, handler func(interface{}))

func (*Pad) OnAcceptCommit

func (p *Pad) OnAcceptCommit(callback func(rev int))

func (*Pad) OnConnected

func (p *Pad) OnConnected(callback func(padState *Pad))

func (*Pad) OnDisconnect

func (p *Pad) OnDisconnect(callback func(err interface{}))

func (*Pad) OnMessage

func (p *Pad) OnMessage(callback func(msg map[string]interface{}))

func (*Pad) OnNewContents

func (p *Pad) OnNewContents(callback func(atext apool.AText))

func (*Pad) OnNumConnectedUsers

func (p *Pad) OnNumConnectedUsers(callback func(count int))

type PadChangeset

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

type PadState

type PadState struct {
	Host  string
	Path  string
	PadId string
}

Jump to

Keyboard shortcuts

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