parser

package
v0.0.0-...-1a9902f Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: AGPL-3.0, AGPL-3.0-or-later Imports: 15 Imported by: 0

Documentation

Overview

Package parser parses and verifies user-sent post data

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPrintable

func IsPrintable(r rune, multiline bool) error

IsPrintable checks, if r is printable. Also accepts tabs, and newlines, if multiline = true.

func IsPrintableRunes

func IsPrintableRunes(s []rune, multiline bool) error

IsPrintableRunes checks, if all of s is printable. Also accepts tabs, and newlines, if multiline = true.

func IsPrintableString

func IsPrintableString(s string, multiline bool) error

IsPrintableString checks, if all of s is printable. Also accepts tabs, and newlines, if multiline = true.

func ParseBody

func ParseBody(body []byte, board string, thread uint64, id uint64, ip string, internal bool) (
	links []common.Link, com []common.Command, err error,
)

ParseBody parses the entire post text body for commands and links. internal: function was called by automated upkeep task

func ParseName

func ParseName(name string) (string, string, error)

ParseName parses the name field into a name and tripcode, if any

func ParseSubject

func ParseSubject(s string) (string, error)

ParseSubject verifies and trims a thread subject string

func VerifyPostPassword

func VerifyPostPassword(s string) error

VerifyPostPassword verifies a post password exists does not surpass the maximum allowed length

Types

This section is empty.

Jump to

Keyboard shortcuts

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