Versions in this module Expand all Collapse all v0 v0.0.1 Jun 17, 2021 Changes in this version + var ErrMissingHeader = errors.New("the length of the `Authorization` header is zero") + func Sign(ctx context.Context, payload map[string]interface{}, secret string, ...) (tokenString string, err error) + type App struct + func New(c *conf.Config, opts ...Option) *App + func (a *App) Run() error + func (a *App) Stop() error + type Option func(o *options) + func Server(srv ...transport.Server) Option + func WithID(id string) Option + func WithLogger(logger log.Logger) Option + func WithName(name string) Option + func WithSignal(sigs ...os.Signal) Option + func WithVersion(version string) Option + type Payload struct + UserID uint64 + func Parse(tokenString string, secret string) (*Payload, error) + func ParseRequest(c *gin.Context) (*Payload, error) + type Response struct + Code int + Data interface{} + Message string + func NewResponse() *Response + func (r *Response) Error(c *gin.Context, err *errno.Error) + func (r *Response) Success(c *gin.Context, data interface{}) + type ValidError struct + Key string + Message string + func (v *ValidError) Error() string + type ValidErrors []*ValidError + func BindAndValid(c *gin.Context, v interface{}) (bool, ValidErrors) + func (v ValidErrors) Error() string + func (v ValidErrors) Errors() []string