capsfile

package
v0.0.0-...-dc8c21b Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCapsKeyValueInvalid = errors.New("caps: invalid key=value")
)

Functions

This section is empty.

Types

type CapComment

type CapComment []byte

type CapDot

type CapDot []byte

type CapEntry

type CapEntry interface {
	// contains filtered or unexported methods
}

type CapKeyValue

type CapKeyValue struct {
	Key   string
	Value string
	Raw   []byte
}

type CapWsp

type CapWsp []byte

type CapsFile

type CapsFile struct {
	Name    string
	Entries []CapEntry
	// contains filtered or unexported fields
}

func NewCapsFile

func NewCapsFile(name string) *CapsFile

func ParseCaps

func ParseCaps(name string, rdr io.Reader, flag ParseCapsFlag) (*CapsFile, error)

func ParseCapsBytes

func ParseCapsBytes(name string, data []byte, flag ParseCapsFlag) (*CapsFile, error)

func (*CapsFile) Bool

func (cf *CapsFile) Bool(key string) (v bool, ok bool, err error)

func (*CapsFile) DefaultEncoding

func (cf *CapsFile) DefaultEncoding() string

func (*CapsFile) ExpiresAfter

func (cf *CapsFile) ExpiresAfter() time.Duration

func (*CapsFile) Int64

func (cf *CapsFile) Int64(key string) (v int64, ok bool, err error)

func (*CapsFile) PathConfig

func (cf *CapsFile) PathConfig() (*gopher.PathConfig, error)

func (*CapsFile) ServerInfo

func (cf *CapsFile) ServerInfo() (*gopher.ServerInfo, error)

func (*CapsFile) Software

func (cf *CapsFile) Software() (name, version string)

func (*CapsFile) String

func (cf *CapsFile) String(key string) (s string, ok bool)

func (*CapsFile) Supports

func (cf *CapsFile) Supports(feature gopher.Feature) gopher.FeatureStatus

func (*CapsFile) TLSPort

func (cf *CapsFile) TLSPort() int

func (*CapsFile) Version

func (cf *CapsFile) Version() int

type ParseCapsFlag

type ParseCapsFlag int
const (
	// Dodgy gopher servers can and do stuff '.\r\n' lines in to the caps file. We allow
	// it by default, but if this flag is set, we forbid it.
	CapsForbidDot ParseCapsFlag = 1 << iota
)

Jump to

Keyboard shortcuts

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