crudl

package
v0.13.17 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Templates

func Templates(embedfsys embed.FS, dir path.Relative) *templates

Types

type Container

type Container struct {
	*html.Element
	ID html.ID
}

func (*Container) HtmxButton

func (c *Container) HtmxButton() *html.Element
func (c *Container) HtmxLink() *html.Element

type Create

type Create[C web.Contexter] struct {
	GET  *web.RouteHandler[C]
	POST *web.RouteHandler[C]
	ID   html.ID
}

func NewCreate

func NewCreate[C web.Contexter](router *web.Router[C], namespace string) Create[C]

type Delete

type Delete[C web.Contexter] struct {
	DELETE *web.RouteHandler[C]
	ID     html.ID
}

func NewDelete

func NewDelete[C web.Contexter](router *web.Router[C], namespace string) Delete[C]

type DeleteGET

type DeleteGET[C web.Contexter] struct {
	GET *web.RouteHandler[C]
	ID  html.ID
}

func NewDeleteGET

func NewDeleteGET[C web.Contexter](router *web.Router[C], namespace string) DeleteGET[C]

type List

type List[C web.Contexter] struct {
	GET *web.RouteHandler[C]
	ID  html.ID
}

func NewList

func NewList[C web.Contexter](router *web.Router[C], namespace string) List[C]

type ListView

type ListView struct {
	// contains filtered or unexported fields
}

func (*ListView) New

func (t *ListView) New() *listViewIter

type Read

type Read[C web.Contexter] struct {
	GET *web.RouteHandler[C]
	ID  html.ID
}

func NewRead

func NewRead[C web.Contexter](router *web.Router[C], namespace string) Read[C]

type TableArgValues

type TableArgValues struct {
	SortColumn       *web.QueryArg[string]
	SortDirection    *web.QueryArg[string]
	Page             *web.QueryArg[int]
	Limit            *web.QueryArg[int]
	FilterColumn     *web.QueryArg[string]
	FilterType       *web.QueryArg[string]
	FilterValue      *web.QueryArg[string]
	ReverseDirection string
	// contains filtered or unexported fields
}

func (*TableArgValues) Set

func (o *TableArgValues) Set() error

type TableArgs

type TableArgs[T web.Contexter] struct {
	SortColumn    web.QueryArg[string]
	SortDirection web.QueryArg[string]
	Page          web.QueryArg[int]
	Limit         web.QueryArg[int]
	FilterColumn  web.QueryArg[string]
	FilterType    web.QueryArg[string]
	FilterValue   web.QueryArg[string]
	// contains filtered or unexported fields
}

func NewTableArgs

func NewTableArgs[T web.Contexter](defaultSortColumn, defaultSortDir string, columns ...string) TableArgs[T]

func (TableArgs[T]) Register

func (t TableArgs[T]) Register(rt *web.RouteHandler[T]) *web.RouteHandler[T]

func (TableArgs[T]) Scan

func (x TableArgs[T]) Scan(ctx web.Contexter, firstTargets ...web.Argument) (TableArgValues, error)

type UpdatePATCH

type UpdatePATCH[C web.Contexter] struct {
	GET   *web.RouteHandler[C]
	PATCH *web.RouteHandler[C]
	ID    html.ID
}

func NewUpdatePATCH

func NewUpdatePATCH[C web.Contexter](router *web.Router[C], namespace string) UpdatePATCH[C]

type UpdatePOST

type UpdatePOST[C web.Contexter] struct {
	GET  *web.RouteHandler[C]
	POST *web.RouteHandler[C]
	ID   html.ID
}

func NewUpdatePOST

func NewUpdatePOST[C web.Contexter](router *web.Router[C], namespace string) UpdatePOST[C]

type UpdatePUT

type UpdatePUT[C web.Contexter] struct {
	GET *web.RouteHandler[C]
	PUT *web.RouteHandler[C]
	ID  html.ID
}

func NewUpdatePUT

func NewUpdatePUT[C web.Contexter](router *web.Router[C], namespace string) UpdatePUT[C]

type View

type View struct {
	Template *templ.Template
}

func (*View) Set

func (t *View) Set(setter ...templ.Setter) html.HTML

Directories

Path Synopsis
example
server command

Jump to

Keyboard shortcuts

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