engine

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

README

Fiber Echo

An implementation of fiber ServerEngine with echo.

License

Copyright (C) 2019 Anbillon Team (anbillonteam@gmail.com)

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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EchoEngine

type EchoEngine struct {
	Echo *echo.Echo
}

An implementation of fiber.ServerEngine with echo.

func NewEchoEngine

func NewEchoEngine() *EchoEngine

NewEchoEngine creates a new instance of echo engine.

func (*EchoEngine) Name

func (e *EchoEngine) Name() string

func (*EchoEngine) Start

func (e *EchoEngine) Start(address string) error

type EchoZeroLogger

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

An adapter of zerolog to implement Echo.Logger.

func (*EchoZeroLogger) Debug

func (l *EchoZeroLogger) Debug(i ...interface{})

func (*EchoZeroLogger) Debugf

func (l *EchoZeroLogger) Debugf(format string, args ...interface{})

func (*EchoZeroLogger) Debugj

func (l *EchoZeroLogger) Debugj(j elog.JSON)

func (*EchoZeroLogger) Error

func (l *EchoZeroLogger) Error(i ...interface{})

func (*EchoZeroLogger) Errorf

func (l *EchoZeroLogger) Errorf(format string, args ...interface{})

func (*EchoZeroLogger) Errorj

func (l *EchoZeroLogger) Errorj(j elog.JSON)

func (*EchoZeroLogger) Fatal

func (l *EchoZeroLogger) Fatal(i ...interface{})

func (*EchoZeroLogger) Fatalf

func (l *EchoZeroLogger) Fatalf(format string, args ...interface{})

func (*EchoZeroLogger) Fatalj

func (l *EchoZeroLogger) Fatalj(j elog.JSON)

func (*EchoZeroLogger) Info

func (l *EchoZeroLogger) Info(i ...interface{})

func (*EchoZeroLogger) Infof

func (l *EchoZeroLogger) Infof(format string, args ...interface{})

func (*EchoZeroLogger) Infoj

func (l *EchoZeroLogger) Infoj(j elog.JSON)

func (*EchoZeroLogger) Level

func (l *EchoZeroLogger) Level() elog.Lvl

func (*EchoZeroLogger) Output

func (l *EchoZeroLogger) Output() io.Writer

func (*EchoZeroLogger) Panic

func (l *EchoZeroLogger) Panic(i ...interface{})

func (*EchoZeroLogger) Panicf

func (l *EchoZeroLogger) Panicf(format string, args ...interface{})

func (*EchoZeroLogger) Panicj

func (l *EchoZeroLogger) Panicj(j elog.JSON)

func (*EchoZeroLogger) Prefix

func (l *EchoZeroLogger) Prefix() string

func (*EchoZeroLogger) Print

func (l *EchoZeroLogger) Print(i ...interface{})

func (*EchoZeroLogger) Printf

func (l *EchoZeroLogger) Printf(format string, args ...interface{})

func (*EchoZeroLogger) Printj

func (l *EchoZeroLogger) Printj(j elog.JSON)

func (*EchoZeroLogger) SetHeader

func (*EchoZeroLogger) SetHeader(h string)

func (*EchoZeroLogger) SetLevel

func (l *EchoZeroLogger) SetLevel(v elog.Lvl)

func (*EchoZeroLogger) SetOutput

func (l *EchoZeroLogger) SetOutput(w io.Writer)

func (*EchoZeroLogger) SetPrefix

func (l *EchoZeroLogger) SetPrefix(p string)

func (*EchoZeroLogger) Warn

func (l *EchoZeroLogger) Warn(i ...interface{})

func (*EchoZeroLogger) Warnf

func (l *EchoZeroLogger) Warnf(format string, args ...interface{})

func (*EchoZeroLogger) Warnj

func (l *EchoZeroLogger) Warnj(j elog.JSON)

type ErrorHandler added in v0.0.2

type ErrorHandler interface {
	// HandleError handles the given error and returns the result.
	HandleError(error, echo.Context) interface{}
}

ErrorHandler defines a error handler for echo.

type Router

type Router interface {
	// Register registers this router into echo.
	Register(e *echo.Echo)
}

Router defines echo router interface.

Jump to

Keyboard shortcuts

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