Documentation
¶
Index ¶
- func NewGinContext(ctx *gin.Context) http.Context
- func NewGinRequest(instance *gin.Context) contracthttp.Request
- func NewGinResponse(instance *gin.Context) httpcontract.Response
- func NewGinSuccess(instance *gin.Context) httpcontract.ResponseSuccess
- type Application
- type GinContext
- func (c *GinContext) Deadline() (deadline time.Time, ok bool)
- func (c *GinContext) Done() <-chan struct{}
- func (c *GinContext) Err() error
- func (c *GinContext) Request() http.Request
- func (c *GinContext) Response() http.Response
- func (c *GinContext) Value(key interface{}) interface{}
- func (c *GinContext) WithValue(key string, value interface{})
- type GinFile
- type GinRequest
- func (r *GinRequest) AbortWithStatus(code int)
- func (r *GinRequest) Bind(obj interface{}) error
- func (r *GinRequest) File(name string) (contracthttp.File, error)
- func (r *GinRequest) Form(key, defaultValue string) string
- func (r *GinRequest) FullUrl() string
- func (r *GinRequest) Header(key, defaultValue string) string
- func (r *GinRequest) Headers() http.Header
- func (r *GinRequest) Input(key string) string
- func (r *GinRequest) Ip() string
- func (r *GinRequest) Method() string
- func (r *GinRequest) Next()
- func (r *GinRequest) Origin() *http.Request
- func (r *GinRequest) Path() string
- func (r *GinRequest) Query(key, defaultValue string) string
- func (r *GinRequest) Response() contracthttp.Response
- func (r *GinRequest) Url() string
- type GinResponse
- func (r *GinResponse) Download(filepath, filename string)
- func (r *GinResponse) File(filepath string)
- func (r *GinResponse) Header(key, value string) httpcontract.Response
- func (r *GinResponse) Json(code int, obj interface{})
- func (r *GinResponse) String(code int, format string, values ...interface{})
- func (r *GinResponse) Success() httpcontract.ResponseSuccess
- type GinSuccess
- type ServiceProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGinRequest ¶
func NewGinRequest(instance *gin.Context) contracthttp.Request
func NewGinResponse ¶
func NewGinResponse(instance *gin.Context) httpcontract.Response
func NewGinSuccess ¶
func NewGinSuccess(instance *gin.Context) httpcontract.ResponseSuccess
Types ¶
type Application ¶
type Application struct {
}
func (*Application) Init ¶
func (app *Application) Init()
type GinContext ¶
type GinContext struct {
// contains filtered or unexported fields
}
func (*GinContext) Done ¶
func (c *GinContext) Done() <-chan struct{}
func (*GinContext) Err ¶
func (c *GinContext) Err() error
func (*GinContext) Request ¶
func (c *GinContext) Request() http.Request
func (*GinContext) Response ¶
func (c *GinContext) Response() http.Response
func (*GinContext) Value ¶
func (c *GinContext) Value(key interface{}) interface{}
func (*GinContext) WithValue ¶
func (c *GinContext) WithValue(key string, value interface{})
type GinFile ¶
type GinFile struct {
// contains filtered or unexported fields
}
func (*GinFile) File ¶
func (f *GinFile) File() *multipart.FileHeader
type GinRequest ¶
type GinRequest struct {
// contains filtered or unexported fields
}
func (*GinRequest) AbortWithStatus ¶
func (r *GinRequest) AbortWithStatus(code int)
func (*GinRequest) Bind ¶
func (r *GinRequest) Bind(obj interface{}) error
func (*GinRequest) File ¶
func (r *GinRequest) File(name string) (contracthttp.File, error)
func (*GinRequest) Form ¶
func (r *GinRequest) Form(key, defaultValue string) string
func (*GinRequest) FullUrl ¶
func (r *GinRequest) FullUrl() string
func (*GinRequest) Header ¶
func (r *GinRequest) Header(key, defaultValue string) string
func (*GinRequest) Headers ¶
func (r *GinRequest) Headers() http.Header
func (*GinRequest) Input ¶
func (r *GinRequest) Input(key string) string
func (*GinRequest) Ip ¶
func (r *GinRequest) Ip() string
func (*GinRequest) Method ¶
func (r *GinRequest) Method() string
func (*GinRequest) Next ¶
func (r *GinRequest) Next()
func (*GinRequest) Origin ¶
func (r *GinRequest) Origin() *http.Request
func (*GinRequest) Path ¶
func (r *GinRequest) Path() string
func (*GinRequest) Query ¶
func (r *GinRequest) Query(key, defaultValue string) string
func (*GinRequest) Response ¶
func (r *GinRequest) Response() contracthttp.Response
func (*GinRequest) Url ¶
func (r *GinRequest) Url() string
type GinResponse ¶
type GinResponse struct {
// contains filtered or unexported fields
}
func (*GinResponse) Download ¶
func (r *GinResponse) Download(filepath, filename string)
func (*GinResponse) File ¶
func (r *GinResponse) File(filepath string)
func (*GinResponse) Header ¶
func (r *GinResponse) Header(key, value string) httpcontract.Response
func (*GinResponse) Json ¶
func (r *GinResponse) Json(code int, obj interface{})
func (*GinResponse) String ¶
func (r *GinResponse) String(code int, format string, values ...interface{})
func (*GinResponse) Success ¶
func (r *GinResponse) Success() httpcontract.ResponseSuccess
type GinSuccess ¶
type GinSuccess struct {
// contains filtered or unexported fields
}
func (*GinSuccess) Json ¶
func (r *GinSuccess) Json(obj interface{})
func (*GinSuccess) String ¶
func (r *GinSuccess) String(format string, values ...interface{})
type ServiceProvider ¶
type ServiceProvider struct {
}
func (*ServiceProvider) Boot ¶
func (database *ServiceProvider) Boot()
func (*ServiceProvider) Register ¶
func (database *ServiceProvider) Register()
Source Files
¶
Click to show internal directories.
Click to hide internal directories.