|
|
@@ -8,7 +8,7 @@ import (
|
|
|
"net/http"
|
|
|
)
|
|
|
|
|
|
-func CRUD(builder *gateway.Builder, params *CommonCRUDParams, opts ...any) {
|
|
|
+func CRUD(builder *gateway.Builder, params *CRUDParams, opts ...any) {
|
|
|
createOptions := new(CreateOptions)
|
|
|
deleteOptions := new(DeleteOptions)
|
|
|
updateOptions := new(UpdateOptions)
|
|
|
@@ -41,7 +41,7 @@ func CRUD(builder *gateway.Builder, params *CommonCRUDParams, opts ...any) {
|
|
|
params.crud(builder)
|
|
|
}
|
|
|
|
|
|
-type CommonCRUDParams struct {
|
|
|
+type CRUDParams struct {
|
|
|
// 除去后缀的服务URL,如http://localhost:8080/example/api/v1
|
|
|
ServiceVersionedUrl string
|
|
|
|
|
|
@@ -62,7 +62,7 @@ type CommonCRUDParams struct {
|
|
|
getByIDOptions *GetByIDOptions
|
|
|
}
|
|
|
|
|
|
-func (params *CommonCRUDParams) crud(builder *gateway.Builder) {
|
|
|
+func (params *CRUDParams) crud(builder *gateway.Builder) {
|
|
|
createOptions := params.createOptions
|
|
|
deleteOptions := params.deleteOptions
|
|
|
updateOptions := params.updateOptions
|