Documentation ¶
Index ¶
- func CreateToken(secret, uid, level string, exp time.Duration) (string, error)
- func NewSingleHostReverseProxy(prefix string, target *url.URL, rmAuth bool) *httputil.ReverseProxy
- func ParseEqualMap(c echo.Context) map[string]string
- func ParseFilterMap(c echo.Context) map[string]string
- func ParseSortMap(c echo.Context) map[string]string
- func QueryDataResult[T any](c echo.Context, tx *gorm.DB, prequery *PreQuery) ([]T, error)
- func ReadImportCsvData(src io.Reader) ([]map[string]interface{}, error)
- func ReadImportExcelData(src io.Reader, sheet string) ([]map[string]interface{}, error)
- func ReadImportJsonData(src io.Reader) ([]map[string]interface{}, error)
- type DateRange
- type JsonOptions
- type Metrics
- type PageResult
- type ParamReader
- func (sr *ParamReader) ReadInt(ref *int, name string, defval int) *ParamReader
- func (sr *ParamReader) ReadInt64(ref *int64, name string, defval int64) *ParamReader
- func (sr *ParamReader) ReadRequiedString(ref *string, name string) *ParamReader
- func (sr *ParamReader) ReadString(ref *string, name string) *ParamReader
- func (sr *ParamReader) ReadStringWithDefault(ref *string, name string, defval string) *ParamReader
- type PreQuery
- func (p *PreQuery) DateRange(queryfd, timefd string, defaltStart time.Time, defaultEnd time.Time) *PreQuery
- func (p *PreQuery) DateRange2(startfd, endfd, timefd string, defaltStart time.Time, defaultEnd time.Time) *PreQuery
- func (p *PreQuery) DefaultOrderBy(fd string) *PreQuery
- func (p *PreQuery) EqualFields(fd ...string) *PreQuery
- func (p *PreQuery) KeyFields(fd ...string) *PreQuery
- func (p *PreQuery) Query(query *gorm.DB) *gorm.DB
- func (p *PreQuery) QueryField(column, qfield string) *PreQuery
- func (p *PreQuery) SetParam(key string, value interface{}) *PreQuery
- type SSE
- func (sse *SSE) Write(data []byte) (n int, err error)
- func (sse *SSE) WriteEvent(event string, data []byte) (err error)
- func (sse *SSE) WriteExec(cmd *exec.Cmd) error
- func (sse *SSE) WriteJSON(data interface{}) (err error)
- func (sse *SSE) WriteMessage(msg SSEMessage) (err error)
- func (sse *SSE) WriteText(msg string) (err error)
- type SSEMessage
- type WebForm
- func (f *WebForm) GetDateRange(name string) (DateRange, error)
- func (f *WebForm) GetInt64Val(name string, defval int64) int64
- func (f *WebForm) GetIntVal(name string, defval int) int
- func (f *WebForm) GetMustVal(name string) (string, error)
- func (f *WebForm) GetVal(name string) string
- func (f *WebForm) GetVal2(name string, defval string) string
- func (f *WebForm) Param(name string) string
- func (f *WebForm) Param2(name string, defval string) string
- func (f *WebForm) ParseTimeDesc(timestr string, defval string) string
- func (f *WebForm) Set(name string, value string)
- type WebRestResult
- type WebixTableColumn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseEqualMap ¶
func ParseFilterMap ¶
func ParseSortMap ¶
func QueryDataResult ¶
func ReadImportExcelData ¶
Types ¶
type JsonOptions ¶
type Metrics ¶
func NewMetrics ¶
type PageResult ¶
type PageResult struct { TotalCount int64 `json:"total_count,omitempty"` Pos int64 `json:"pos"` Data interface{} `json:"data"` }
func QueryPageResult ¶
type ParamReader ¶
type ParamReader struct { LastError error // contains filtered or unexported fields }
参数快速读取,避免多次错误处理
func NewParamReader ¶
func NewParamReader(c echo.Context) *ParamReader
func (*ParamReader) ReadInt ¶
func (sr *ParamReader) ReadInt(ref *int, name string, defval int) *ParamReader
func (*ParamReader) ReadInt64 ¶
func (sr *ParamReader) ReadInt64(ref *int64, name string, defval int64) *ParamReader
func (*ParamReader) ReadRequiedString ¶
func (sr *ParamReader) ReadRequiedString(ref *string, name string) *ParamReader
func (*ParamReader) ReadString ¶
func (sr *ParamReader) ReadString(ref *string, name string) *ParamReader
func (*ParamReader) ReadStringWithDefault ¶
func (sr *ParamReader) ReadStringWithDefault(ref *string, name string, defval string) *ParamReader
type PreQuery ¶
type PreQuery struct {
// contains filtered or unexported fields
}
func NewPreQuery ¶
func NewPreQuery(c echo.Context) *PreQuery
func (*PreQuery) DateRange2 ¶
func (*PreQuery) DefaultOrderBy ¶
func (*PreQuery) EqualFields ¶
func (*PreQuery) QueryField ¶
type SSE ¶
func (*SSE) WriteMessage ¶
func (sse *SSE) WriteMessage(msg SSEMessage) (err error)
type SSEMessage ¶
type WebForm ¶
type WebForm struct { FormItem interface{} Posts url.Values `json:"-" form:"-" query:"-"` Gets url.Values `json:"-" form:"-" query:"-"` Params map[string]string `json:"-" form:"-" query:"-"` }
WEB 参数
func EmptyWebForm ¶
func EmptyWebForm() *WebForm
func NewWebForm ¶
func NewWebForm(c echo.Context) *WebForm
func (*WebForm) ParseTimeDesc ¶
ParseTimeDesc 解析时间描述 now-1hour 最近1小时 now-1min 最近1分钟 now-1day 最近1天
type WebRestResult ¶
type WebRestResult struct { Code int `json:"code"` Msgtype string `json:"msgtype"` Msg string `json:"msg"` Data interface{} `json:"data"` }
func RestError ¶
func RestError(msg string) *WebRestResult
func RestResult ¶
func RestResult(data interface{}) *WebRestResult
func RestSucc ¶
func RestSucc(msg string) *WebRestResult
type WebixTableColumn ¶
type WebixTableColumn struct { Id string `json:"id,omitempty"` Header interface{} `json:"header,omitempty"` Editor string `json:"editor,omitempty"` Options interface{} `json:"options,omitempty"` Adjust interface{} `json:"adjust,omitempty"` Hidden interface{} `json:"hidden,omitempty"` Sort string `json:"sort,omitempty"` Fillspace interface{} `json:"fillspace,omitempty"` Css string `json:"css,omitempty"` Template string `json:"template,omitempty"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` }
Webix 表格列定义
Click to show internal directories.
Click to hide internal directories.