Documentation
¶
Index ¶
- func GetI18nData(c *gin.Context) gogo_i18n.GoGoi18nInterface
- func LoadI18nDataFromDatabase(db *gorm.DB, storeType string, storePath string)
- type HttpTester
- func (h *HttpTester) DELETE(uri string, param interface{}) (int, *e.Response)
- func (h *HttpTester) GET(uri string) (int, *e.Response)
- func (h *HttpTester) PATCH(uri string, param interface{}) (int, *e.Response)
- func (h *HttpTester) POST(uri string, param interface{}) (int, *e.Response)
- func (h *HttpTester) PUT(uri string, param interface{}) (int, *e.Response)
- type HttpTesterInterface
- type RequestHandler
- type RequestHandlerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetI18nData ¶ added in v1.0.2
Types ¶
type HttpTester ¶ added in v1.0.5
type HttpTester struct {
// contains filtered or unexported fields
}
func (*HttpTester) DELETE ¶ added in v1.0.5
func (h *HttpTester) DELETE(uri string, param interface{}) (int, *e.Response)
DELETE 模擬 Delete Request的動作
func (*HttpTester) GET ¶ added in v1.0.5
func (h *HttpTester) GET(uri string) (int, *e.Response)
Get 模擬Get Request的動作
func (*HttpTester) PATCH ¶ added in v1.0.5
func (h *HttpTester) PATCH(uri string, param interface{}) (int, *e.Response)
PATCH 模擬 Patch Request的動作
type HttpTesterInterface ¶ added in v1.0.5
type HttpTesterInterface interface { GET(uri string) (int, *e.Response) POST(uri string, param interface{}) (int, *e.Response) PUT(uri string, param interface{}) (int, *e.Response) PATCH(uri string, param interface{}) (int, *e.Response) DELETE(uri string, param interface{}) (int, *e.Response) }
func NewHttpTester ¶ added in v1.0.5
func NewHttpTester(router *gin.Engine) HttpTesterInterface
type RequestHandler ¶
type RequestHandler struct {
// contains filtered or unexported fields
}
func (*RequestHandler) BindBody ¶
func (r *RequestHandler) BindBody(c *gin.Context, body interface{}) error
BindBody : 綁定 body
func (*RequestHandler) ValidValidation ¶
func (r *RequestHandler) ValidValidation(v *validation.Validation) error
ValidValidation : 驗證表單資訊
type RequestHandlerInterface ¶
type RequestHandlerInterface interface { //BindBody : 綁定 body BindBody(c *gin.Context, body interface{}) error //ValidValidation : 驗證表單資訊 ValidValidation(v *validation.Validation) error }
func NewRequestHandler ¶
func NewRequestHandler() RequestHandlerInterface
Click to show internal directories.
Click to hide internal directories.