handler

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2017 License: Apache-2.0 Imports: 11 Imported by: 115

Documentation

Overview

Copyright 2016 Wenhui Shen <www.webx.top>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	Handlers      = []func(*echo.Echo){}
	GroupHandlers = map[string][]func(*echo.Group){}
)
View Source
var (
	WebSocketLogger = log.GetLogger(`websocket`)
	IsWindows       bool
)

Functions

func Err

func Err(ctx echo.Context, err error) (ret interface{})

func NoticeWriter

func NoticeWriter(ctx echo.Context, noticeType string) (wOut io.Writer, wErr io.Writer, err error)

func Ok

func Ok(v string) errors.Successor

func Paging

func Paging(ctx echo.Context) (page int, size int)

func PagingWithPagination

func PagingWithPagination(ctx echo.Context, delKeys ...string) (page int, size int, rows int, p *pagination.Pagination)

func Register

func Register(fn func(*echo.Echo))

func RegisterToGroup

func RegisterToGroup(groupName string, fn func(*echo.Group))

func SendFail

func SendFail(ctx echo.Context, msg string)

func SendOk

func SendOk(ctx echo.Context, msg string)

func User

func User(ctx echo.Context) *dbschema.User

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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