tray

package
v1.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ServerPort = 3492

ServerPort the port server listens to

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
}

Client a client to work with the server interface

func NewClient

func NewClient() *Client

func (*Client) AddDelete

func (d *Client) AddDelete(file string)

AddDelete sends delete information to the server

func (*Client) AddMove

func (d *Client) AddMove(tempFile, targetFile, exe string, arguments []string, canKill bool, processId int32)

AddMove sends move information to the server

func (*Client) IsRunning

func (d *Client) IsRunning() bool

type DeleteMessageHandler

type DeleteMessageHandler func(cmd *DeletePayload)

DeleteMessageHandler handle the delete operation

type DeletePayload

type DeletePayload struct {
	Type string
	File string
}

DeletePayload delete file information

type MoveMessageHandler

type MoveMessageHandler func(cmd *MovePayload)

MoveMessageHandler handle the move operation

type MovePayload

type MovePayload struct {
	Type      string
	Temp      string
	Target    string
	Exe       string
	Arguments []string
	CanKill   bool
	ProcessId int32
}

MovePayload move file information

type Server

type Server struct {
	MoveHandler   MoveMessageHandler
	DeleteHandler DeleteMessageHandler
	// contains filtered or unexported fields
}

Server struct for handling delete and move operation

func NewServer

func NewServer() *Server

func (*Server) Start

func (t *Server) Start()

func (*Server) Stop

func (t *Server) Stop()

Jump to

Keyboard shortcuts

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