Skip to content

Commit

Permalink
feat: support form tag param object
Browse files Browse the repository at this point in the history
  • Loading branch information
SilkageNet committed May 14, 2022
1 parent c313e2b commit 6e729de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ go 1.16

require (
github.com/fatih/structtag v1.2.0
github.com/pinealctx/neptune v0.6.6
github.com/pinealctx/neptune v0.8.4-0.20220513082456-ea94fa5e23b9
go.uber.org/zap v1.19.0
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0=
github.com/pinealctx/neptune v0.6.6 h1:u7hf7wYN34/eXhqQQiszcK71X/yRwjYmR1/Jfcs+C18=
github.com/pinealctx/neptune v0.6.6/go.mod h1:iXablJYzLuv4TZ2zV48Q70B6smZHK7yigFVeSYZRqrU=
github.com/pinealctx/neptune v0.8.4-0.20220513082456-ea94fa5e23b9 h1:TIcKYL//7FolnOokczGBV9gmqBgnH9ZeDSAmDIZ/iLc=
github.com/pinealctx/neptune v0.8.4-0.20220513082456-ea94fa5e23b9/go.mod h1:UBoazYtLqDqKo52rMYfQxkmEVE6l1LLGB00ZzMJ39R4=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand Down
3 changes: 3 additions & 0 deletions param.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func ObjectParams(obj interface{}) []IParam {
const (
tagNameQuery = "query"
tagNamePath = "path"
tagNameForm = "form"
tagNameHeader = "header"
tagNameCookie = "cookie"
tagOptionRequired = "required"
Expand Down Expand Up @@ -273,6 +274,8 @@ func makeParamByTag(tag, name, value string) IParam {
return NewURLQueryParam(name, value)
case tagNamePath:
return NewURLSegmentParam(name, value, "")
case tagNameForm:
return NewFormDataParam(name, value)
case tagNameHeader:
return NewHeaderParam(name, value)
case tagNameCookie:
Expand Down

0 comments on commit 6e729de

Please sign in to comment.