autocomplete

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParamPage       = "page"
	ParamPageSize   = "pageSize"
	ParamSearch     = "search"
	ResponseItems   = "data"
	ResponseTotal   = "total"
	ResponsePages   = "pages"
	ResponseCurrent = "current"
)

Variables

This section is empty.

Functions

func NewDefaultAutocompleteDataSource

func NewDefaultAutocompleteDataSource(v string) *vx.AutocompleteDataSource

Types

type Builder

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

func New

func New() *Builder

func (*Builder) AllowCrossOrigin added in v3.0.5

func (b *Builder) AllowCrossOrigin(v bool) *Builder

func (*Builder) DB

func (b *Builder) DB(v *gorm.DB) *Builder

func (*Builder) Logger

func (b *Builder) Logger(v *zap.Logger) *Builder

func (*Builder) Model

func (b *Builder) Model(v interface{}) (r *ModelBuilder)

func (*Builder) Mux added in v3.0.5

func (b *Builder) Mux(mux Handler)

func (*Builder) NewModelBuilder

func (b *Builder) NewModelBuilder(model interface{}) (mb *ModelBuilder)

func (*Builder) Prefix

func (b *Builder) Prefix(v string) *Builder

func (*Builder) ServeHTTP

func (b *Builder) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Handler added in v3.0.5

type Handler interface {
	Handle(pattern string, handler http.Handler)
}

type ModelBuilder

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

func (*ModelBuilder) Columns

func (b *ModelBuilder) Columns(v ...string) *ModelBuilder

func (*ModelBuilder) JsonHref

func (b *ModelBuilder) JsonHref() string

func (*ModelBuilder) NewModel

func (b *ModelBuilder) NewModel() (r interface{})

func (*ModelBuilder) NewModelSlice

func (b *ModelBuilder) NewModelSlice() (r interface{})

func (*ModelBuilder) OrderBy

func (b *ModelBuilder) OrderBy(v string) *ModelBuilder

func (*ModelBuilder) Paging

func (b *ModelBuilder) Paging(v bool) *ModelBuilder

func (*ModelBuilder) SQLCondition

func (b *ModelBuilder) SQLCondition(v string) *ModelBuilder

func (*ModelBuilder) ServeHTTP

func (b *ModelBuilder) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*ModelBuilder) UriName

func (b *ModelBuilder) UriName(v string) *ModelBuilder

type Response

type Response struct {
	Data    []map[string]interface{} `json:"data"`
	Total   int64                    `json:"total"`
	Pages   int                      `json:"pages"`
	Current int64                    `json:"current"`
}

Jump to

Keyboard shortcuts

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