Documentation
¶
Index ¶
- Variables
- func Decrypt(data string) []byte
- func Element(c seed.Seed) string
- func Encrypt(data []byte) string
- func Handler(w http.ResponseWriter, r *http.Request, id string)
- func ID(c seed.Seed) string
- func Key() (key [32]byte)
- func On(event string, do ...Script) seed.Option
- func OnChange(do ...Script) seed.Option
- func OnClick(do ...Script) seed.Option
- func OnEnterKey(do ...Script) seed.Option
- func OnError(do func(err String) Script) seed.Option
- func OnInput(do ...Script) seed.Option
- func OnLoad(do ...Script) seed.Option
- func OnRender(do ...Script) seed.Option
- func Option(o seed.Option, q js.Ctx) seed.Option
- func RegisterRenderer(r Renderer)
- func RegisterRootRenderer(r Renderer)
- func Render(root seed.Seed) []byte
- func Reverse(o seed.Option, q js.Ctx) seed.Option
- func SetID(id string) seed.Option
- func Split(s String, sep String) js.Array
- func Unique() string
- type Bool
- type Compound
- type Cookie
- type Data
- type File
- type Float
- type Function
- type IfElseChain
- type Int
- type Mode
- type Name
- type Object
- type Redirect
- type Renderer
- type Request
- type Requesty
- type Script
- func Adopt(c seed.Seed) Script
- func After(duration time.Duration, do ...Script) Script
- func Cancel() Script
- func Download(fn interface{}, args ...Value) Script
- func Go(fn interface{}, args ...Value) Script
- func NewScript(do ...Script) Script
- func Open(url String) Script
- func Print() Script
- func Run(fn interface{}, args ...Value) Script
- func Throw(err String) Script
- type Stream
- type String
- type Value
Constants ¶
This section is empty.
Variables ¶
var ClickCursor seed.Option
ClickCursor is an option that is added to all OnClicks.
Functions ¶
func Handler ¶
func Handler(w http.ResponseWriter, r *http.Request, id string)
Handler returns a handler for handling remote procedure calls.
func Key ¶
func Key() (key [32]byte)
Key returns the key used by session to encrypt data. Reads key from SESSION_KEY env. Will create a key and store it in seed.Dir if it env is not set.
func OnEnterKey ¶
OnEnterKey is called when the client presses the Enter key whilst focused on this seed.
func OnError ¶
OnError calls the provided script when there is an error not handled by this seed or any children seeds.
func OnLoad ¶
OnLoad is called when the seed is loaded by the client. this will only be called once per app-launch, or in the case of dynamic content, once when the seed is created.
func RegisterRenderer ¶
func RegisterRenderer(r Renderer)
func RegisterRootRenderer ¶
func RegisterRootRenderer(r Renderer)
Types ¶
type Compound ¶
type Compound interface {
Components() []Value
}
Compound values have dependent components.
type IfElseChain ¶
type IfElseChain struct {
Script
}
IfElseChain allows else to be called on it.
func If ¶
func If(condition Bool, do ...Script) IfElseChain
If runs the provided scripts if the clients condition is true.
func (IfElseChain) Else ¶
func (chain IfElseChain) Else(do ...Script) Script
Else runs the provided scripts if the preceding conditions were false.
type Redirect ¶
type Redirect string
Redirect is a special error-type that signifies that a redirect is required to complete the request.
type Request ¶
Request holds the metadata about an incomming request from the client.
func NewRequest ¶
func NewRequest(w http.ResponseWriter, r *http.Request) Request
NewRequest returns a new request from the given values.
type Script ¶
func Go ¶
Go requests the client to call the given Go function in a new goroutine, with the given client Values automatically converted to equivalent Go values and are passed to the given function. The function can optionally take a Ctx as the first argument, if so, then it is passed to the function and arguments are assigned to the following arguments.
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream is an incomming data steam from the client.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package clientsafe provides an error type that is safe to show to clients.
|
Package clientsafe provides an error type that is safe to show to clients. |
Package clientzip provides clientside zipping functionality.
|
Package clientzip provides clientside zipping functionality. |
if
|
|