Documentation
¶
Index ¶
- func DELETE(route string, handler interface{}) interfaces.TransportOption
- func EnableCORS() interfaces.TransportOption
- func GET(route string, handler interface{}) interfaces.TransportOption
- func POST(route string, handler interface{}) interfaces.TransportOption
- func PUT(route string, handler interface{}) interfaces.TransportOption
- func WithHandler(mode, route string, handler interface{}) interfaces.TransportOption
- func WithLogger(logger *logrus.Logger) interfaces.TransportOption
- func WithMiddleware(middleware interface{}) interfaces.TransportOption
- func WithPort(port int) interfaces.TransportOption
- func WithStaticFilesFolder(route, folder string) interfaces.TransportOption
- type Rest
- func (r *Rest) Handler(mode, route string, handler interface{}) error
- func (r *Rest) Middleware(middleware interface{}) error
- func (r *Rest) Port() int
- func (r *Rest) Router() (interface{}, error)
- func (r *Rest) Run() error
- func (r *Rest) StaticFilesFolder(uri, folder string) error
- func (r *Rest) Stop() error
- func (r *Rest) WithLogger(logger *logrus.Logger) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DELETE ¶
func DELETE(route string, handler interface{}) interfaces.TransportOption
func EnableCORS ¶
func EnableCORS() interfaces.TransportOption
func GET ¶
func GET(route string, handler interface{}) interfaces.TransportOption
func POST ¶
func POST(route string, handler interface{}) interfaces.TransportOption
func PUT ¶
func PUT(route string, handler interface{}) interfaces.TransportOption
func WithHandler ¶
func WithHandler(mode, route string, handler interface{}) interfaces.TransportOption
func WithLogger ¶
func WithLogger(logger *logrus.Logger) interfaces.TransportOption
func WithMiddleware ¶
func WithMiddleware(middleware interface{}) interfaces.TransportOption
func WithPort ¶
func WithPort(port int) interfaces.TransportOption
func WithStaticFilesFolder ¶
func WithStaticFilesFolder(route, folder string) interfaces.TransportOption
Types ¶
type Rest ¶
Rest Server
func New ¶
func New(options ...interfaces.TransportOption) (*Rest, error)
func (*Rest) Middleware ¶
func (*Rest) StaticFilesFolder ¶
Click to show internal directories.
Click to hide internal directories.