Documentation ¶
Index ¶
- Constants
- Variables
- func AddScheme(input string) string
- func ContainsPrefix(words []string, prefix string) (string, bool)
- func Decode(base *url.URL, input string, ignoreUnknownKeys bool, into interface{ ... }, ...) (map[string][]string, error)
- func Pow2Less(v int) int
- func Pow2More(v int) int
- func TagsOk(sf reflect.StructField) ([]string, bool)
- type ALink
- type FetchKey
- type FetchKeys
- type Nlinks
- type Num
- type Params
- func (p *Params) Decode(req *http.Request) error
- func (p Params) Encode() (string, error)
- func (p *Params) EncodeN(num *Num, absolute int, setNegative *bool) (string, error)
- func (p *Params) EncodeT(num *Num) (string, error)
- func (p *Params) MarshalJSON() ([]byte, error)
- func (p Params) Nlinks() map[string]Nlinks
- func (p *Params) ResetSchema()
- func (p *Params) SetDefaults(form url.Values)
- func (p *Params) Tlinks() map[string]string
- func (p *Params) Vlinks() map[string][]VLink
- type RenamedConstError
- type Schema
- type VLink
Constants ¶
View Source
const ( FS int // 1 MP // 2 AVAIL // 3 USEPCT // 4 USED // 5 TOTAL // 6 )
Constants for DF sorting criterion.
View Source
const ( PID int // 1 UID // 2 USER // 3 PRI // 4 NICE // 5 VIRT // 6 RES // 7 TIME // 8 NAME // 9 )
Constants for PS sorting criterion.
Variables ¶
View Source
var NumType = reflect.TypeOf(Num{})
Functions ¶
Types ¶
type ALink ¶
type FetchKey ¶ added in v0.6.1
type FetchKey struct { URL url.URL Schema // url tag not used til encoding with query.Values for normalization. Times int // `url:"times"` }
FetchKey encloses an URL and has extra params.
type FetchKeys ¶ added in v0.6.1
func NewFetchKeys ¶ added in v0.6.1
type Num ¶
type Num struct { Negative bool Absolute int DefaultNegative bool `json:"-"` DefaultAbsolute int `json:"-"` Limit int `json:"-"` Alpha bool `json:"-"` PositiveOnly bool `json:"-"` }
Num has no MarshalJSON.
func (Num) EncodeString ¶
EncodeString returns string repr of Num. Templates render .Absolute value explicitly.
func (*Num) UnmarshalText ¶
type Params ¶
func (*Params) MarshalJSON ¶
func (*Params) ResetSchema ¶
func (p *Params) ResetSchema()
func (*Params) SetDefaults ¶
type RenamedConstError ¶
type RenamedConstError string
RenamedConstError denotes an error.
func (RenamedConstError) Error ¶
func (rc RenamedConstError) Error() string
type Schema ¶
type Schema struct { // Still is here to be preserved for url encoding. // Not in use by Go code, but by js. Still Num `url:"still,posonly,default0"` CPUn Num `url:"cpun,default-2"` Dfn Num `url:"dfn,default-2"` Ifn Num `url:"ifn,default-2"` Lan Num `url:"lan,default-3"` Memn Num `url:"memn,default-2"` Psn Num `url:"psn,default-8"` Psk Num `url:"psk,default1,enumerate9"` // sort, default PID Dfk Num `url:"dfk,default1,enumerate6"` // sort, default FS }
Click to show internal directories.
Click to hide internal directories.