dii2phelper

package
v0.0.0-...-bc8fae0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConnectionDirectory string

ConnectionDirectory is the global working directory of the service

View Source
var DiskAvoidance = false

Functions

func CheckURLType

func CheckURLType(request string) bool

CheckURLType assures a URL is intended for i2p. For now it also assures a URL is going to an http service. That will change soon, to a whitelist approach.

func CleanURL

func CleanURL(request string) (string, string)

CleanURL will at some point be replaced.

func ClearFile

func ClearFile(directory, path string)

ClearFile does nothing here.

func SafeURLString

func SafeURLString(str string) string

SafeURLString removes illegal characters from URL strings

func SetupFiFo

func SetupFiFo(directory, path string) (string, *os.File, error)

SetupFiFo creates a named pipe

func SetupFile

func SetupFile(directory, path string) (string, *os.File, error)

SetupFile creates a regular file

func SetupFolder

func SetupFolder(directory string) bool

SetupFolder Creates a folder for a site or directory control interface

func SetupScanner

func SetupScanner(directory, path string, pipe *os.File) (*bufio.Scanner, error)

SetupScanner sets up a scanner

Types

type WrappedFile

type WrappedFile struct {
	DiskAvoidance       bool
	ConnectionDirectory string

	Path     string
	PipeFile *os.File
	PipeScan *bufio.Scanner
}

func NewFile

func NewFile(path string) *WrappedFile

func (*WrappedFile) OpenAsFiFo

func (wrapped *WrappedFile) OpenAsFiFo()

func (*WrappedFile) OpenAsFile

func (wrapped *WrappedFile) OpenAsFile()

func (*WrappedFile) OpenAsScanner

func (wrapped *WrappedFile) OpenAsScanner()

func (*WrappedFile) WriteString

func (wrapped *WrappedFile) WriteString(input ...string)

Jump to

Keyboard shortcuts

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