ldktest

package
v2.0.0-...-50fc115 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClipboardService

type ClipboardService struct {
	Readf   func(context.Context) (string, error)
	Listenf func(context.Context, ldk.ClipboardListenConfiguration) error
	Writef  func(context.Context, string) error
}

func (*ClipboardService) Listen

func (*ClipboardService) Read

func (c *ClipboardService) Read(ctx context.Context) (string, error)

func (*ClipboardService) Write

func (c *ClipboardService) Write(ctx context.Context, s string) error

type CursorService

type CursorService struct {
	PositionF       func(context.Context) (ldk.CursorPosition, error)
	ListenPositionF func(context.Context, ldk.ListenPositionHandler) error
}

func (*CursorService) ListenPosition

func (c *CursorService) ListenPosition(ctx context.Context, handler ldk.ListenPositionHandler) error

func (*CursorService) Position

func (c *CursorService) Position(ctx context.Context) (ldk.CursorPosition, error)

type FilesystemService

type FilesystemService struct {
	Dirf        func(context.Context, string) ([]os.FileInfo, error)
	ListenDirf  func(context.Context, string, ldk.ListenDirHandler) error
	ListenFilef func(context.Context, string, ldk.ListenFileHandler) error
	Openf       func(context.Context, string) (ldk.File, error)
	Createf     func(context.Context, string) (ldk.File, error)
	MakeDirf    func(context.Context, string, uint32) error
	Copyf       func(context.Context, string, string) error
	Movef       func(context.Context, string, string) error
	Removef     func(context.Context, string, bool) error
}

func (*FilesystemService) Copy

func (f *FilesystemService) Copy(ctx context.Context, source, dest string) error

func (*FilesystemService) Create

func (f *FilesystemService) Create(ctx context.Context, name string) (ldk.File, error)

func (*FilesystemService) Dir

func (f *FilesystemService) Dir(ctx context.Context, dir string) ([]os.FileInfo, error)

func (*FilesystemService) ListenDir

func (f *FilesystemService) ListenDir(ctx context.Context, dir string, handler ldk.ListenDirHandler) error

func (*FilesystemService) ListenFile

func (f *FilesystemService) ListenFile(ctx context.Context, file string, handler ldk.ListenFileHandler) error

func (*FilesystemService) MakeDir

func (f *FilesystemService) MakeDir(ctx context.Context, name string, mode uint32) error

func (*FilesystemService) Move

func (f *FilesystemService) Move(ctx context.Context, source, dest string) error

func (*FilesystemService) Open

func (f *FilesystemService) Open(ctx context.Context, name string) (ldk.File, error)

func (*FilesystemService) Remove

func (f *FilesystemService) Remove(ctx context.Context, path string, recursive bool) error

type KeyboardService

type KeyboardService struct {
	ListenHotkeyf    func(context.Context, ldk.Hotkey, ldk.ListenHotkeyHandler) error
	ListenTextf      func(context.Context, ldk.KeyboardListenTextConfiguration) error
	ListenCharacterf func(context.Context, ldk.ListenCharacterHandler) error
}

func (*KeyboardService) ListenCharacter

func (k *KeyboardService) ListenCharacter(ctx context.Context, handler ldk.ListenCharacterHandler) error

func (*KeyboardService) ListenHotkey

func (k *KeyboardService) ListenHotkey(ctx context.Context, hotkey ldk.Hotkey, handler ldk.ListenHotkeyHandler) error

func (*KeyboardService) ListenText

func (k *KeyboardService) ListenText(ctx context.Context, configuration ldk.KeyboardListenTextConfiguration) error

type MockFile

type MockFile struct {
	ReadBuf  bytes.Buffer
	WriteBuf bytes.Buffer
	FileInfo os.FileInfo
}

func CreateMockFile

func CreateMockFile(rBytes []byte) MockFile

func (*MockFile) Chmod

func (m *MockFile) Chmod(mode os.FileMode) error

func (*MockFile) Chown

func (m *MockFile) Chown(uid, gid int) error

func (*MockFile) Close

func (m *MockFile) Close() error

func (*MockFile) Read

func (m *MockFile) Read(b []byte) (int, error)

func (*MockFile) Stat

func (m *MockFile) Stat() (os.FileInfo, error)

func (*MockFile) Sync

func (m *MockFile) Sync() error

func (*MockFile) Write

func (m *MockFile) Write(b []byte) (int, error)

type NetworkService

type NetworkService struct {
	HTTPRequestf func(context.Context, *ldk.HTTPRequest) (*ldk.HTTPResponse, error)
}

func (*NetworkService) HTTPRequest

func (f *NetworkService) HTTPRequest(ctx context.Context, req *ldk.HTTPRequest) (*ldk.HTTPResponse, error)

type Sidekick

type Sidekick struct {
	ClipboardService  ldk.ClipboardService
	CursorService     ldk.CursorService
	FilesystemService ldk.FilesystemService
	KeyboardService   ldk.KeyboardService
	NetworkService    ldk.NetworkService
	ProcessService    ldk.ProcessService
	VaultService      ldk.VaultService
	UIService         ldk.UIService
	WhisperService    ldk.WhisperService
	WindowService     ldk.WindowService
}

func (*Sidekick) Clipboard

func (s *Sidekick) Clipboard() ldk.ClipboardService

func (*Sidekick) Cursor

func (s *Sidekick) Cursor() ldk.CursorService

func (*Sidekick) Filesystem

func (s *Sidekick) Filesystem() ldk.FilesystemService

func (*Sidekick) Keyboard

func (s *Sidekick) Keyboard() ldk.KeyboardService

func (*Sidekick) Network

func (s *Sidekick) Network() ldk.NetworkService

func (*Sidekick) Process

func (s *Sidekick) Process() ldk.ProcessService

func (*Sidekick) UI

func (s *Sidekick) UI() ldk.UIService

func (*Sidekick) Vault

func (s *Sidekick) Vault() ldk.VaultService

func (*Sidekick) Whisper

func (s *Sidekick) Whisper() ldk.WhisperService

func (*Sidekick) Window

func (s *Sidekick) Window() ldk.WindowService

type UIService

type UIService struct {
	ListenSearchbarf    func(context.Context, ldk.ListenSearchHandler) error
	ListenGlobalSearchf func(context.Context, ldk.ListenSearchHandler) error
}

func (*UIService) ListenGlobalSearch

func (u *UIService) ListenGlobalSearch(ctx context.Context, cb ldk.ListenSearchHandler) error

func (*UIService) ListenSearchbar

func (u *UIService) ListenSearchbar(ctx context.Context, cb ldk.ListenSearchHandler) error

type VaultService

type VaultService struct {
	Deletef func(context.Context, string) error
	Existsf func(context.Context, string) (bool, error)
	Readf   func(context.Context, string) (string, error)
	Writef  func(context.Context, string, string) error
}

func (*VaultService) Delete

func (s *VaultService) Delete(ctx context.Context, str string) error

func (*VaultService) Exists

func (s *VaultService) Exists(ctx context.Context, str string) (bool, error)

func (*VaultService) Read

func (s *VaultService) Read(ctx context.Context, str string) (string, error)

func (*VaultService) Write

func (s *VaultService) Write(ctx context.Context, s1 string, s2 string) error

type WhisperService

func (*WhisperService) Confirm

func (w *WhisperService) Confirm(ctx context.Context, content *ldk.WhisperContentConfirm) (bool, error)

func (*WhisperService) Disambiguation

func (w *WhisperService) Disambiguation(ctx context.Context, content *ldk.WhisperContentDisambiguation) (bool, error)

func (*WhisperService) Form

func (*WhisperService) List

func (w *WhisperService) List(ctx context.Context, content *ldk.WhisperContentList) error

func (*WhisperService) Markdown

func (w *WhisperService) Markdown(ctx context.Context, content *ldk.WhisperContentMarkdown) error

type WindowService

type WindowService struct {
	ActiveWindowf       func(ctx context.Context) (ldk.WindowInfo, error)
	ListenActiveWindowf func(ctx context.Context, handler ldk.ListenActiveWindowHandler) error
	Statef              func(ctx context.Context) ([]ldk.WindowInfo, error)
	ListenStatef        func(ctx context.Context, handler ldk.ListenWindowStateHandler) error
}

func (*WindowService) ActiveWindow

func (w *WindowService) ActiveWindow(ctx context.Context) (ldk.WindowInfo, error)

func (*WindowService) ListenActiveWindow

func (w *WindowService) ListenActiveWindow(ctx context.Context, handler ldk.ListenActiveWindowHandler) error

func (*WindowService) ListenState

func (w *WindowService) ListenState(ctx context.Context, handler ldk.ListenWindowStateHandler) error

func (*WindowService) State

func (w *WindowService) State(ctx context.Context) ([]ldk.WindowInfo, error)

Jump to

Keyboard shortcuts

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