Documentation
¶
Index ¶
- Constants
- type CachedResult
- type Condition
- type Config
- type Context
- func (c *Context) Body() value.Value
- func (c *Context) Cookie(name string) value.Value
- func (c *Context) Cookies() value.Value
- func (c *Context) Error(v value.Value)
- func (c *Context) File(path string, code ...int)
- func (c *Context) HTML(v value.Value, code ...int)
- func (c *Context) Header(k string) value.Value
- func (c *Context) Headers() value.Value
- func (c *Context) Host() value.Value
- func (c *Context) Hostname() value.Value
- func (c *Context) Href() value.Value
- func (c *Context) IP() value.Value
- func (c *Context) IsAJAX() value.Value
- func (c *Context) IsJSON() value.Value
- func (c *Context) JSON(v value.Value, code ...int)
- func (c *Context) JSONBody() value.Value
- func (c *Context) Method() value.Value
- func (c *Context) OriginalURL() value.Value
- func (c *Context) Params(key string) value.Value
- func (c *Context) Path() value.Value
- func (c *Context) Pattern() value.Value
- func (c *Context) Query(key string) value.Value
- func (c *Context) Redirect(url string, code ...int)
- func (c *Context) Req() *Request
- func (c *Context) Request() *Request
- func (c *Context) Res() *Response
- func (c *Context) Response() *Response
- func (c *Context) Route() value.Value
- func (c *Context) SaveFile(field, dest string) value.Value
- func (c *Context) Secure() value.Value
- func (c *Context) Status(code int) *Response
- func (c *Context) Text(v value.Value, code ...int)
- func (c *Context) URI() value.Value
- func (c *Context) URL() value.Value
- func (c *Context) UserAgent() value.Value
- type DBQuery
- func (q *DBQuery) Avg(column string) value.Value
- func (q *DBQuery) Count(field ...string) value.Value
- func (q *DBQuery) Create(data value.Value) value.Value
- func (q *DBQuery) Delete() value.Value
- func (q *DBQuery) Destroy() value.Value
- func (q *DBQuery) Exists(args ...value.Value) value.Value
- func (q *DBQuery) Find(idOrFn any) value.Value
- func (q *DBQuery) First(args ...value.Value) value.Value
- func (q *DBQuery) From(table string) *DBQuery
- func (q *DBQuery) Get() value.Value
- func (q *DBQuery) GetTable() string
- func (q *DBQuery) Group(columns ...string) *DBQuery
- func (q *DBQuery) Having(args ...value.Value) *DBQuery
- func (q *DBQuery) In(columnOrFn any, vals ...any) *DBQuery
- func (q *DBQuery) Insert(data value.Value) value.Value
- func (q *DBQuery) Join(tableOrFn any, args ...value.Value) *DBQuery
- func (q *DBQuery) Last() value.Value
- func (q *DBQuery) LeftJoin(tableOrFn any, args ...value.Value) *DBQuery
- func (q *DBQuery) Like(columnOrFn any, pattern ...string) *DBQuery
- func (q *DBQuery) Limit(n float64) *DBQuery
- func (q *DBQuery) Limited(n float64) *DBQuery
- func (q *DBQuery) List(args ...value.Value) value.Value
- func (q *DBQuery) Max(column string) value.Value
- func (q *DBQuery) Min(column string) value.Value
- func (q *DBQuery) NotNull(column string) *DBQuery
- func (q *DBQuery) Null(column string) *DBQuery
- func (q *DBQuery) Offset(n float64) *DBQuery
- func (q *DBQuery) On(args ...value.Value) *DBQuery
- func (q *DBQuery) Or(args ...value.Value) *DBQuery
- func (q *DBQuery) OrderBy(column string, direction ...string) *DBQuery
- func (q *DBQuery) Raw() value.Value
- func (q *DBQuery) Remove() value.Value
- func (q *DBQuery) Returning(fields ...string) *DBQuery
- func (q *DBQuery) Select(fields ...string) *DBQuery
- func (q *DBQuery) SetExecutor(e *runtime.VM)
- func (q *DBQuery) SingleOrDefault() value.Value
- func (q *DBQuery) Skip(n float64) *DBQuery
- func (q *DBQuery) String() string
- func (q *DBQuery) Sum(column string) value.Value
- func (q *DBQuery) Table(table string) *DBQuery
- func (q *DBQuery) Take(args ...value.Value) value.Value
- func (q *DBQuery) ToList() value.Value
- func (q *DBQuery) ToSQL() SQL
- func (q *DBQuery) Update(data value.Value) value.Value
- func (q *DBQuery) Where(args ...value.Value) *DBQuery
- type Database
- func (d *Database) Atomic(args ...value.Value) value.Value
- func (d *Database) Config(config *database.Config) *Database
- func (d *Database) Connect(vals ...value.Value) *Database
- func (d *Database) Connected() *Database
- func (d *Database) Connection() *Database
- func (d *Database) Count(args ...value.Value) value.Value
- func (d *Database) Create(args ...value.Value) value.Value
- func (d *Database) Delete() value.Value
- func (d *Database) Exists(args ...value.Value) value.Value
- func (d *Database) Find(args ...value.Value) value.Value
- func (d *Database) First(args ...value.Value) value.Value
- func (d *Database) GroupBy(cols ...string) *Query
- func (d *Database) Join(args ...value.Value) *Query
- func (d *Database) Limit(limit int) *Query
- func (d *Database) List(args ...value.Value) value.Value
- func (d *Database) NewQuery() *Query
- func (d *Database) OrderBy(col string, dir ...string) *Query
- func (d *Database) Remove() value.Value
- func (d *Database) Save(args ...value.Value) value.Value
- func (d *Database) Select(fields ...string) *Query
- func (d *Database) Table(table string) *Query
- func (d *Database) Update(args ...value.Value) value.Value
- func (d *Database) Where(args ...value.Value) *Query
- type Entity
- type HTTP
- type HTTPResponse
- type JoinQuery
- type KitWork
- type Layout
- type Log
- type OrderQuery
- type Query
- func (q *Query) And(args ...value.Value) *Query
- func (q *Query) Avg(col string) value.Value
- func (q *Query) Count(args ...value.Value) value.Value
- func (q *Query) Create(args ...value.Value) value.Value
- func (q *Query) Debug() *Query
- func (q *Query) Delete() value.Value
- func (q *Query) Exists(args ...value.Value) value.Value
- func (q *Query) Field(set string) *Query
- func (q *Query) Find(vals ...value.Value) value.Value
- func (q *Query) First(val ...value.Value) value.Value
- func (q *Query) From(names ...string) *Query
- func (q *Query) Group(cols ...string) *Query
- func (q *Query) GroupBy(cols ...string) *Query
- func (q *Query) Having(args ...value.Value) *Query
- func (q *Query) In(column string, vals any) *Query
- func (q *Query) IsNull(column string) *Query
- func (q *Query) Join(args ...value.Value) *Query
- func (q *Query) Last() value.Value
- func (q *Query) LeftJoin(table string, on string) *Query
- func (q *Query) Like(args ...value.Value) *Query
- func (q *Query) Limit(n int) *Query
- func (q *Query) Limited(n int) *Query
- func (q *Query) List(args ...value.Value) value.Value
- func (q *Query) Max(col string) value.Value
- func (q *Query) Method(name string) *Query
- func (q *Query) Min(col string) value.Value
- func (q *Query) NotNull(column string) *Query
- func (q *Query) Offset(n int) *Query
- func (q *Query) Or(args ...value.Value) *Query
- func (q *Query) Order(col string, dir string) *Query
- func (q *Query) OrderBy(col string, dir ...string) *Query
- func (q *Query) Raw() value.Value
- func (q *Query) Remove() value.Value
- func (q *Query) Returning(fields ...string) *Query
- func (q *Query) RightJoin(table string, on string) *Query
- func (q *Query) Save(args ...value.Value) value.Value
- func (q *Query) Select(fields ...string) *Query
- func (q *Query) SingleOrDefault() value.Value
- func (q *Query) Skip(n int) *Query
- func (q *Query) Sort(col string, dir ...string) *Query
- func (q *Query) Sum(col string) value.Value
- func (q *Query) Table(names ...string) *Query
- func (q *Query) Take(n int) *Query
- func (q *Query) ToList() value.Value
- func (q *Query) ToSQL() map[string]any
- func (q *Query) Update(args ...value.Value) value.Value
- func (q *Query) Where(args ...value.Value) *Query
- type Render
- func (r *Render) Bind(data value.Value) value.Value
- func (r *Render) Directory(vals ...value.Value) *Render
- func (r *Render) Exists(name string) bool
- func (r *Render) Global(val value.Value) *Render
- func (r *Render) HTML(tmpl string, data any) string
- func (r *Render) Has(name string) bool
- func (r *Render) Index(vals ...value.Value) *Render
- func (r *Render) Layout(val value.Value) *Render
- func (r *Render) New(dir ...string) *Render
- func (r *Render) NotFound(vals ...value.Value) *Render
- func (r *Render) Page(vals ...value.Value) *Render
- func (r *Render) Path(vals ...value.Value) *Render
- func (r *Render) Template(vals ...value.Value) *Render
- type Request
- func (r *Request) Benchmark(vals ...value.Value) value.Value
- func (r *Request) Body() value.Value
- func (r *Request) Cookie(name string) value.Value
- func (r *Request) Cookies() value.Value
- func (r *Request) FormParams() value.Value
- func (r *Request) FormValue(key string) value.Value
- func (r *Request) Header(key string) value.Value
- func (r *Request) Headers() value.Value
- func (r *Request) Host() value.Value
- func (r *Request) Hostname() value.Value
- func (r *Request) Href() value.Value
- func (r *Request) IP() value.Value
- func (r *Request) IsAJAX() value.Value
- func (r *Request) IsJSON() value.Value
- func (r *Request) JSON() value.Value
- func (r *Request) Method() value.Value
- func (r *Request) MultipartForm() (*multipart.Form, error)
- func (r *Request) OriginalURL() value.Value
- func (r *Request) Page() value.Value
- func (r *Request) Params(key string) value.Value
- func (r *Request) Path() value.Value
- func (r *Request) Pattern() value.Value
- func (r *Request) Protocol() value.Value
- func (r *Request) Query(key string) value.Value
- func (r *Request) Referer() value.Value
- func (r *Request) Route() value.Value
- func (r *Request) SaveFile(fieldName string, destPath string) value.Value
- func (r *Request) Scheme() value.Value
- func (r *Request) Secure() value.Value
- func (r *Request) URI() value.Value
- func (r *Request) URL() value.Value
- func (r *Request) UserAgent() value.Value
- func (r *Request) XHR() value.Value
- type Response
- func (r *Response) Bytes(data []byte, code ...int)
- func (r *Response) Code() int
- func (r *Response) Data() value.Value
- func (r *Response) Directory(path string, code ...int)
- func (r *Response) Error(data value.Value, code ...int)
- func (r *Response) ErrorString(data string, code ...int)
- func (r *Response) File(path string, code ...int)
- func (r *Response) HTML(data value.Value, code ...int)
- func (r *Response) HelloWorld()
- func (r *Response) Image(data []byte, code ...int)
- func (r *Response) IsError() bool
- func (r *Response) IsSend() bool
- func (r *Response) JSON(data value.Value, code ...int)
- func (r *Response) Kind() string
- func (r *Response) Layout(layout string) *Response
- func (r *Response) NotFound()
- func (r *Response) Redirect(url value.Value, code ...int)
- func (r *Response) Render(data value.Value, code ...int)
- func (r *Response) Return(data value.Value, kind string, code ...int)
- func (r *Response) Send(data value.Value, options ...interface{})
- func (r *Response) Status(code int) *Response
- func (r *Response) String(data string, code ...int)
- func (r *Response) Template(index string) *Response
- func (r *Response) Text(data value.Value, code ...int)
- type Router
- func (r *Router) Benchmark(v value.Value) *Router
- func (r *Router) Cache(v value.Value) *Router
- func (r *Router) Catch(v value.Value) *Router
- func (r *Router) Directory(path string) *Router
- func (r *Router) File(path string) *Router
- func (r *Router) Finally(v value.Value) *Router
- func (r *Router) Get(path string) *Router
- func (r *Router) Group(prefix string) *Router
- func (r *Router) Guard(l value.Value) *Router
- func (r *Router) Handle(l value.Value) *Router
- func (r *Router) New(method, path string) *Router
- func (r *Router) Post(path string) *Router
- func (r *Router) Redirect(url string) *Router
- func (r *Router) Response(data value.Value, options ...interface{}) *Router
- func (r *Router) Static(v value.Value) *Router
- func (r *Router) Then(v value.Value) *Router
- type Routes
- type SQL
- type SQLProxy
- type StaticCacheMeta
- type Tenant
Constants ¶
const ( // Database Defaults DefaultDBLimit = 60 // Soft limit if .take() is not specified DefaultDBMaxLimit = 120 // Hard safety cap if .limited() is not specified // Execution Defaults DefaultAPITimeout = 30 * time.Second DefaultWorkerRetry = 0 DefaultStaticCache = 24 * time.Hour )
System Defaults These values act as the baseline configuration for the Engine logic. They can be overridden by specific runtime configurations if needed.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedResult ¶ added in v0.1.1
type Config ¶ added in v0.1.1
type Config struct {
// contains filtered or unexported fields
}
Router struct is defined in router.go
type Context ¶ added in v0.1.1
type Context struct {
// contains filtered or unexported fields
}
Context HUB Context HUB - Lớp vỏ bọc để JS code nhìn quen thuộc
func (*Context) OriginalURL ¶ added in v0.1.1
type DBQuery ¶
type DBQuery struct {
// contains filtered or unexported fields
}
func NewDBQuery ¶
func NewDBQuery() *DBQuery
func (*DBQuery) Raw ¶ added in v0.1.1
Raw returns a Kitwork `value.Value` that contains both the generated SQL string **and** the slice of arguments that will be bound to the placeholders. This is useful for debugging, logging, or any scenario where you want to see the exact query that will be sent to the database without actually executing it.
func (*DBQuery) SetExecutor ¶
func (*DBQuery) SingleOrDefault ¶ added in v0.1.1
type Database ¶ added in v0.1.1
type Database struct {
// contains filtered or unexported fields
}
func (*Database) Connection ¶ added in v0.1.1
type HTTPResponse ¶ added in v0.1.1
func (HTTPResponse) JSON ¶ added in v0.1.1
func (r HTTPResponse) JSON() value.Value
JSON method for javascript: fetch.json()
func (HTTPResponse) Text ¶ added in v0.1.1
func (r HTTPResponse) Text() string
Support direct .body access if it's already a string or bytes
type KitWork ¶ added in v0.1.1
type KitWork struct {
// contains filtered or unexported fields
}
type OrderQuery ¶ added in v0.1.1
type Query ¶ added in v0.1.1
type Query struct {
// contains filtered or unexported fields
}
func (*Query) SingleOrDefault ¶ added in v0.1.1
type Render ¶ added in v0.1.1
type Render struct {
// contains filtered or unexported fields
}
type Request ¶ added in v0.1.1
type Request struct {
// contains filtered or unexported fields
}
func (*Request) FormParams ¶ added in v0.1.1
func (*Request) MultipartForm ¶ added in v0.1.1
func (*Request) OriginalURL ¶ added in v0.1.1
type Response ¶ added in v0.1.1
type Response struct {
// contains filtered or unexported fields
}
func (*Response) ErrorString ¶ added in v0.1.1
func (*Response) HelloWorld ¶ added in v0.1.1
func (r *Response) HelloWorld()
type Routes ¶ added in v0.1.2
type Routes struct {
// contains filtered or unexported fields
}