caddyscript

package
v2.0.0-beta9 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPRequest

type HTTPRequest struct{ Req *http.Request }

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) Attr

func (r Regexp) Attr(name string) (starlark.Value, error)

Attr defines what happens when props or methods are called on the Time type.

func (Regexp) AttrNames

func (r Regexp) AttrNames() []string

AttrNames defines what properties and methods are available on the Time type.

func (Regexp) Freeze

func (r Regexp) Freeze()

func (Regexp) Hash

func (r Regexp) Hash() (uint32, error)

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.

func (Regexp) String

func (r Regexp) String() string

func (Regexp) Truth

func (r Regexp) Truth() starlark.Bool

func (Regexp) Type

func (r Regexp) Type() string

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) Attr

func (r Time) Attr(name string) (starlark.Value, error)

Attr defines what happens when props or methods are called on the Time type.

func (Time) AttrNames

func (r Time) AttrNames() []string

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) Freeze

func (r Time) Freeze()

func (Time) Hash

func (r Time) Hash() (uint32, error)

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.

func (Time) String

func (r Time) String() string

func (Time) Subtract

func (r Time) Subtract(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)

Subtract adds time to a time type.

func (Time) Truth

func (r Time) Truth() starlark.Bool

func (Time) Type

func (r Time) Type() string

Jump to

Keyboard shortcuts

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