internal

package
v1.67.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package internal provides internal implementation for the info test command.

Index

Constants

This section is empty.

Variables

PositionList contains all valid positions

Functions

This section is empty.

Types

type ControlResult

type ControlResult struct {
	Text       string `json:"-"`
	WriteError map[Position]string
	GetError   map[Position]string
	InList     map[Position]Presence
}

ControlResult contains the result of a single character test

type InfoReport

type InfoReport struct {
	Remote               string
	ControlCharacters    *map[string]ControlResult
	MaxFileLength        *int
	CanStream            *bool
	CanWriteUnnormalized *bool
	CanReadUnnormalized  *bool
	CanReadRenormalized  *bool
}

InfoReport is the structure of the JSON output

type Position

type Position int

Position is the placement of the test character in the filename

const (
	PositionMiddle Position = 1 << iota
	PositionLeft
	PositionRight
	PositionNone Position = 0
	PositionAll  Position = PositionRight<<1 - 1
)

Predefined positions

func (Position) MarshalText

func (e Position) MarshalText() ([]byte, error)

MarshalText encodes the position when used as a map key

func (Position) String

func (e Position) String() string

func (*Position) UnmarshalText

func (e *Position) UnmarshalText(text []byte) error

UnmarshalText decodes a position when used as a map key

type Presence

type Presence int

Presence describes the presence of a filename in file listing

const (
	Absent Presence = iota
	Present
	Renamed
	Multiple
)

Possible Presence states

func (Presence) MarshalJSON

func (e Presence) MarshalJSON() ([]byte, error)

MarshalJSON encodes the presence when used as a JSON value

func (Presence) String

func (e Presence) String() string

func (*Presence) UnmarshalJSON

func (e *Presence) UnmarshalJSON(text []byte) error

UnmarshalJSON decodes a presence when used as a JSON value

Directories

Path Synopsis
Package main provides utilities for the info test command.
Package main provides utilities for the info test command.

Jump to

Keyboard shortcuts

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