Documentation ¶
Index ¶
- type HTTPRequest
- func (r HTTPRequest) Attr(name string) (starlark.Value, error)
- func (r HTTPRequest) AttrNames() []string
- func (r HTTPRequest) Freeze()
- func (r HTTPRequest) Hash() (uint32, error)
- func (r HTTPRequest) Header(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (r HTTPRequest) Redirect(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (r HTTPRequest) String() string
- func (r HTTPRequest) Truth() starlark.Bool
- func (r HTTPRequest) Type() string
- type Regexp
- func (r Regexp) Attr(name string) (starlark.Value, error)
- func (r Regexp) AttrNames() []string
- func (r Regexp) Freeze()
- func (r Regexp) Hash() (uint32, error)
- func (r Regexp) MatchString(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (r Regexp) String() string
- func (r Regexp) Truth() starlark.Bool
- func (r Regexp) Type() string
- type Time
- func (r Time) Add(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (r Time) Attr(name string) (starlark.Value, error)
- func (r Time) AttrNames() []string
- func (r Time) Day(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (r Time) Freeze()
- func (r Time) Hash() (uint32, error)
- func (r Time) Hour(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (r Time) Minute(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (r Time) Now(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (r Time) ParseDuration(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (r Time) String() string
- func (r Time) Subtract(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (r Time) Truth() starlark.Bool
- func (r Time) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPRequest ¶
HTTPRequest represents an http request type in caddyscript.
func (HTTPRequest) Attr ¶
func (r HTTPRequest) Attr(name string) (starlark.Value, error)
Attr defines what happens when props or methods are called on the HTTPRequest type.
func (HTTPRequest) AttrNames ¶
func (r HTTPRequest) AttrNames() []string
AttrNames defines what properties and methods are available on the HTTPRequest type.
func (HTTPRequest) Freeze ¶
func (r HTTPRequest) Freeze()
func (HTTPRequest) Hash ¶
func (r HTTPRequest) Hash() (uint32, error)
func (HTTPRequest) Header ¶
func (r HTTPRequest) Header(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
Header handles returning a header key.
func (HTTPRequest) Redirect ¶
func (r HTTPRequest) Redirect(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
Redirect handles an http redirect from starlark code.
func (HTTPRequest) String ¶
func (r HTTPRequest) String() string
func (HTTPRequest) Truth ¶
func (r HTTPRequest) Truth() starlark.Bool
func (HTTPRequest) Type ¶
func (r HTTPRequest) Type() string
type Regexp ¶
type Regexp struct{}
Regexp represents a regexp type for caddyscript.
func (Regexp) AttrNames ¶
AttrNames defines what properties and methods are available on the Time type.
func (Regexp) MatchString ¶
func (r Regexp) MatchString(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
MatchString reports whether the string s contains any match of the regular expression pattern. More complicated queries need to use Compile and the full Regexp interface.
type Time ¶
type Time struct {
// contains filtered or unexported fields
}
Time represents a time type for caddyscript.
func (Time) Add ¶
func (r Time) Add(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
Add adds time to a time type.
func (Time) AttrNames ¶
AttrNames defines what properties and methods are available on the Time type.
func (Time) Day ¶
func (r Time) Day(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
Day returns the current day in a week of a unix timestamp... [Sunday = 0...]
func (Time) Hour ¶
func (r Time) Hour(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
Hour returns the current hour of a unix timestamp in range [0, 23].
func (Time) Minute ¶
func (r Time) Minute(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
Minute returns the current minute of the hour for a unix timestamp in range [0, 59].
func (Time) Now ¶
func (r Time) Now(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
Now returns the current time as a unix timestamp.
func (Time) ParseDuration ¶
func (r Time) ParseDuration(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
ParseDuration parses a go duration string to a time type.