client

package
v0.0.0-...-d81c3b0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DeleteFile = "DeleteFile"

DeleteFile is the Payload value from the Printer to Delete a file normally a *LCK file

View Source
const DestDir = "destDir"

DestDir is the Payload value from the Printer for the files dir on the filesystem

View Source
const DestName = "destName"

DestName is the Payload value from the Printer for the filename on the filesystem

View Source
const ListDirectory = "ListDir"

ListDirectory is the Payload value from the Printer to List Directory Values to avoid filename collisions

View Source
const MakeDir = "MakeDir"

MakeDir is the Payload value from the Printer to Make a Directory if it doesn't exit

View Source
const Operation = "theOperation"

Operation is the Payload field from the Printer for the the operation to happen, ListDir, MakeDir etc

View Source
const PutFile = "PutFile"

PutFile is the Payload value from the Printer to upload a file

View Source
const RemoveDir = "RemoveDir"

RemoveDir is the Payload value from the Printer to Delete a directory

View Source
const Sendfile = "sendfile"

Sendfile is the Payload field from the Printer for the the file itself

View Source
const XRXBADNAME = "XRXBADNAME"

XRXBADNAME is the filename is bad due to to FS constraints

View Source
const XRXDIREXISTS = "XRXDIREXISTS"

XRXDIREXISTS is the directory exists already

View Source
const XRXERROR = "XRXERROR"

XRXERROR is the default error message

View Source
const XRXNOTFOUND = "XRXNOTFOUND"

XRXNOTFOUND is the not found error message

Variables

This section is empty.

Functions

func HandleRequests

func HandleRequests(x XeroxApi) http.Handler

HandleRequests takes the XeroxApi and handles all the List, Del, Remove, Put actions

Types

type XeroxApi

type XeroxApi interface {
	ListDirectory(directory string) (string, error)
	CleanPath(directory string) string
	DeleteDir(directory string) error
	PutFile(r *http.Request, directory string) ([]byte, error)
	MakeDirectory(directory string) error
}

XeroxApi Interface for all Printer to Server Interactions

func NewClient

func NewClient() (XeroxApi, error)

NewClient generates a new generic client for uploading

func NewFileSystemClient

func NewFileSystemClient(pgId int, gId int) XeroxApi

NewFileSystemClient creates a new UNIX FileSystem client

func NewGoogleClient

func NewGoogleClient() (XeroxApi, error)

NewGoogleClient creates a new Google Drive client

Jump to

Keyboard shortcuts

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