Documentation
¶
Index ¶
- func NewGinRequest(instance *gin.Context) httpcontract.Request
- func NewGinResponse(instance *gin.Context) httpcontract.Response
- func NewGinSuccess(instance *gin.Context) httpcontract.ResponseSuccess
- type Application
- type GinFile
- type GinRequest
- func (r *GinRequest) AbortWithStatus(code int)
- func (r *GinRequest) Bind(obj interface{}) error
- func (r *GinRequest) Context() context.Context
- func (r *GinRequest) File(name string) (httpcontract.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) Path() string
- func (r *GinRequest) Query(key, defaultValue string) string
- func (r *GinRequest) Url() string
- func (r *GinRequest) WithContext(ctx context.Context) httpcontract.Request
- 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 ¶ added in v1.0.0
func NewGinRequest(instance *gin.Context) httpcontract.Request
func NewGinResponse ¶ added in v1.0.0
func NewGinResponse(instance *gin.Context) httpcontract.Response
func NewGinSuccess ¶ added in v1.0.0
func NewGinSuccess(instance *gin.Context) httpcontract.ResponseSuccess
Types ¶
type Application ¶
type Application struct {
}
func (*Application) Init ¶
func (app *Application) Init()
type GinFile ¶ added in v1.0.0
type GinFile struct {
// contains filtered or unexported fields
}
func (*GinFile) File ¶ added in v1.0.0
func (f *GinFile) File() *multipart.FileHeader
type GinRequest ¶ added in v1.0.0
type GinRequest struct {
// contains filtered or unexported fields
}
func (*GinRequest) AbortWithStatus ¶ added in v1.0.0
func (r *GinRequest) AbortWithStatus(code int)
func (*GinRequest) Bind ¶ added in v1.0.0
func (r *GinRequest) Bind(obj interface{}) error
func (*GinRequest) Context ¶ added in v1.0.0
func (r *GinRequest) Context() context.Context
func (*GinRequest) File ¶ added in v1.0.0
func (r *GinRequest) File(name string) (httpcontract.File, error)
func (*GinRequest) Form ¶ added in v1.0.0
func (r *GinRequest) Form(key, defaultValue string) string
func (*GinRequest) FullUrl ¶ added in v1.0.0
func (r *GinRequest) FullUrl() string
func (*GinRequest) Header ¶ added in v1.0.0
func (r *GinRequest) Header(key, defaultValue string) string
func (*GinRequest) Headers ¶ added in v1.0.0
func (r *GinRequest) Headers() http.Header
func (*GinRequest) Input ¶ added in v1.0.0
func (r *GinRequest) Input(key string) string
func (*GinRequest) Ip ¶ added in v1.0.0
func (r *GinRequest) Ip() string
func (*GinRequest) Method ¶ added in v1.0.0
func (r *GinRequest) Method() string
func (*GinRequest) Next ¶ added in v1.0.0
func (r *GinRequest) Next()
func (*GinRequest) Path ¶ added in v1.0.0
func (r *GinRequest) Path() string
func (*GinRequest) Query ¶ added in v1.0.0
func (r *GinRequest) Query(key, defaultValue string) string
func (*GinRequest) Url ¶ added in v1.0.0
func (r *GinRequest) Url() string
func (*GinRequest) WithContext ¶ added in v1.0.0
func (r *GinRequest) WithContext(ctx context.Context) httpcontract.Request
type GinResponse ¶ added in v1.0.0
type GinResponse struct {
// contains filtered or unexported fields
}
func (*GinResponse) Download ¶ added in v1.0.0
func (r *GinResponse) Download(filepath, filename string)
func (*GinResponse) File ¶ added in v1.0.0
func (r *GinResponse) File(filepath string)
func (*GinResponse) Header ¶ added in v1.0.0
func (r *GinResponse) Header(key, value string) httpcontract.Response
func (*GinResponse) Json ¶ added in v1.0.0
func (r *GinResponse) Json(code int, obj interface{})
func (*GinResponse) String ¶ added in v1.0.0
func (r *GinResponse) String(code int, format string, values ...interface{})
func (*GinResponse) Success ¶ added in v1.0.0
func (r *GinResponse) Success() httpcontract.ResponseSuccess
type GinSuccess ¶ added in v1.0.0
type GinSuccess struct {
// contains filtered or unexported fields
}
func (*GinSuccess) Json ¶ added in v1.0.0
func (r *GinSuccess) Json(obj interface{})
func (*GinSuccess) String ¶ added in v1.0.0
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.