v_api

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Log smLog
	// contains filtered or unexported fields
}
 ============================================
	Created by andy pangaribuan on 2020/04/01
	Copyright BoltIdea. All rights reserved.
   ============================================

func (*Context) BindPars

func (slf *Context) BindPars(destination interface{}) error

func (*Context) GetRequestBody

func (slf *Context) GetRequestBody() (string, error)

func (*Context) GetRequestIp

func (slf *Context) GetRequestIp() (reqIp string)

func (*Context) GetTraceId

func (slf *Context) GetTraceId() string

func (*Context) ResponseJson

func (slf *Context) ResponseJson(code int, response interface{}) error

func (*Context) ResponseJsonBlob

func (slf *Context) ResponseJsonBlob(code int, response []byte) error

func (*Context) ResponseStr

func (slf *Context) ResponseStr(code int, response string) error

func (*Context) SetRequestUserId

func (slf *Context) SetRequestUserId(uid string)

type HandlerFunc

type HandlerFunc func(Context) error

type SMEchoApi

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

func BuildEcho

func BuildEcho(port int, logMiddleware clog.EchoMiddleware) *SMEchoApi

noinspection GoUnusedExportedFunction

func (*SMEchoApi) POST

func (slf *SMEchoApi) POST(path string, handler HandlerFunc)

func (*SMEchoApi) Serve

func (slf *SMEchoApi) Serve()

Jump to

Keyboard shortcuts

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