Documentation ¶
Index ¶
- type Config
- type Context
- func (c *Context) AttachContext(context context.Context)
- func (c *Context) AttachedContext() context.Context
- func (c *Context) Bind(i interface{}) vader.Error
- func (c *Context) BindWithValidator(i interface{}, key string, fn validator.Func) vader.Error
- func (c *Context) Error(err vader.Error) error
- func (c *Context) FromContext(key string) interface{}
- func (c *Context) GetHeader(key string) []byte
- func (c *Context) GetValue(key string) interface{}
- func (c *Context) JSON(status int, obj interface{}) error
- func (c *Context) Message(status int, message string) error
- func (c *Context) Next() error
- func (c *Context) Param(key string) interface{}
- func (c *Context) Query(key string) []byte
- func (c *Context) SetValue(key string, value interface{})
- type Handler
- type Response
- type Router
- func (r *Router) Delete(path string, handler Handler, middlewares ...Handler)
- func (r *Router) Get(path string, handler Handler, middlewares ...Handler)
- func (r *Router) Patch(path string, handler Handler, middlewares ...Handler)
- func (r *Router) Post(path string, handler Handler, middlewares ...Handler)
- func (r *Router) Put(path string, handler Handler, middlewares ...Handler)
- func (r *Router) Use(middlewares ...Handler)
- type Yoda
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.2.0
type Config struct { Addr string Name string CORS cors.Config IdleTimeout time.Duration WriteTimeout time.Duration ReadTimeout time.Duration }
Config struct
type Context ¶ added in v0.2.0
type Context struct {
Parent *atreugo.RequestCtx
}
Context struct
func (*Context) AttachContext ¶ added in v0.4.7
AttachContext adds a new context to the current one
func (*Context) AttachedContext ¶ added in v0.4.7
AttachedContext returns the attached context
func (*Context) BindWithValidator ¶ added in v0.3.0
BindWithValidator binds a json with custom validaroe
func (*Context) FromContext ¶ added in v0.2.0
FromContext returns a value from a context using the key
type Response ¶
type Response struct { Message string `json:"message,omitempty"` Error string `json:"error,omitempty"` Data interface{} `json:"data,omitempty"` }
Response struct
type Router ¶ added in v0.2.0
type Router struct {
Parent *atreugo.Router
}
Router struct
type Yoda ¶
type Yoda struct { *atreugo.Atreugo // contains filtered or unexported fields }
Server struct
func NewServerWithConfig ¶ added in v0.2.0
func NewServerWithConfig(config atreugo.Config) *Yoda
NewServerWithConfig creates a yoda server with config
Click to show internal directories.
Click to hide internal directories.