rpc

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Server

func Server(socketName, password, authKey, name string, idleTimeout time.Duration) error

Server serves the encryption service via the unix domain socket

Types

type RequestProcessorClient

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

RequestProcessorClient wraps the connection to the rpc server

func NewRequestProcessorClient

func NewRequestProcessorClient(network, address, name string) (*RequestProcessorClient, error)

NewRequestProcessorClient creates a new client to the encrypt/decrypt agent

func (*RequestProcessorClient) Decrypt

func (s *RequestProcessorClient) Decrypt(data string) (string, error)

Decrypt a block of data

func (*RequestProcessorClient) Encrypt

func (s *RequestProcessorClient) Encrypt(data string) (string, error)

Encrypt a block of data

func (*RequestProcessorClient) Init

func (s *RequestProcessorClient) Init(password, name string) (string, error)

Init sets up the server with the given password

func (*RequestProcessorClient) Login

func (s *RequestProcessorClient) Login(password, authKey, name string) error

Login validates the password with the authKey

func (*RequestProcessorClient) Ping

func (s *RequestProcessorClient) Ping() error

Ping the server

Jump to

Keyboard shortcuts

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