Documentation ¶
Index ¶
- func DeleteRoute(builder *gateway.Builder, params *Simple, opts ...Option)
- func DeleteRouteWithDeleteUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func DeleteRouteWithDeleteUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
- func DeleteRouteWithTenantID(builder *gateway.Builder, params *Simple, opts ...Option)
- func DeleteRouteWithTenantIDAndDeleteUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func DeleteRouteWithTenantIDAndDeleteUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
- func DeleteRouteWithTenantIDAndUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func DeleteRouteWithTenantIDAndUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
- func DeleteRouteWithUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func DeleteRouteWithUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
- func GetRoute(builder *gateway.Builder, params *Simple, opts ...Option)
- func GetRouteWithCreateUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func GetRouteWithDeleteUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func GetRouteWithTenantID(builder *gateway.Builder, params *Simple, opts ...Option)
- func GetRouteWithTenantIDAndCreateUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func GetRouteWithTenantIDAndDeleteUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func GetRouteWithTenantIDAndUpdateUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func GetRouteWithTenantIDAndUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func GetRouteWithUpdateUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func GetRouteWithUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func PostRoute(builder *gateway.Builder, params *Simple, opts ...Option)
- func PostRouteWithCreateUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func PostRouteWithCreateUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
- func PostRouteWithTenantID(builder *gateway.Builder, params *Simple, opts ...Option)
- func PostRouteWithTenantIDAndCreateUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func PostRouteWithTenantIDAndCreateUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
- func PostRouteWithTenantIDAndUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func PostRouteWithTenantIDAndUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
- func PostRouteWithUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func PostRouteWithUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
- func PutRoute(builder *gateway.Builder, params *Simple, opts ...Option)
- func PutRouteWithTenantID(builder *gateway.Builder, params *Simple, opts ...Option)
- func PutRouteWithTenantIDAndUpdateUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func PutRouteWithTenantIDAndUpdateUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
- func PutRouteWithTenantIDAndUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func PutRouteWithTenantIDAndUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
- func PutRouteWithUpdateUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func PutRouteWithUpdateUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
- func PutRouteWithUserID(builder *gateway.Builder, params *Simple, opts ...Option)
- func PutRouteWithUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
- type Option
- func WithAfterRequestCallback(callback RequestBuilderCallback) Option
- func WithBeforeRequestCallback(callback RequestBuilderCallback) Option
- func WithMiddlewares(middlewares ...gateway.Handler) Option
- func WithResponseErrorCallback(callback gateway.ResponseErrorCallback) Option
- func WithResponseSuccessCallback(callback gateway.ResponseSuccessCallback) Option
- func WithTenantIDParamsName(tenantIDParamsName string) Option
- func WithUserIDParamsName(userIDParamsName string) Option
- func WithUserNameParamsName(userNameParamsName string) Option
- type Options
- type RequestBuilderCallback
- type Simple
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteRoute ¶ added in v0.11.11
DeleteRoute DELETE直传API 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func DeleteRouteWithDeleteUserID ¶ added in v0.11.11
DeleteRouteWithDeleteUserID DELETE直传API,会在查询参数添加用户ID字段,字段名分别为deleteUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func DeleteRouteWithDeleteUserInfo ¶ added in v0.12.3
DeleteRouteWithDeleteUserInfo DELETE直传API,会在查询参数添加用户ID字段,字段名分别为deleteUserId,还会添加操作者用户名,字段名为operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func DeleteRouteWithTenantID ¶ added in v0.11.11
DeleteRouteWithTenantID DELETE直传API,会在查询参数添加租户ID字段,字段名分别为tenantId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func DeleteRouteWithTenantIDAndDeleteUserID ¶ added in v0.11.11
func DeleteRouteWithTenantIDAndDeleteUserID(builder *gateway.Builder, params *Simple, opts ...Option)
DeleteRouteWithTenantIDAndDeleteUserID DELETE直传API,会在查询参数添加租户ID和用户ID字段,字段名分别为tenantId和deleteUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func DeleteRouteWithTenantIDAndDeleteUserInfo ¶ added in v0.12.3
func DeleteRouteWithTenantIDAndDeleteUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
DeleteRouteWithTenantIDAndDeleteUserInfo DELETE直传API,会在查询参数添加租户ID和用户ID字段,字段名分别为为tenantId,userId和operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func DeleteRouteWithTenantIDAndUserID ¶ added in v0.11.11
DeleteRouteWithTenantIDAndUserID DELETE直传API,会在查询参数添加租户ID和用户ID字段,字段名分别为tenantId和userId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func DeleteRouteWithTenantIDAndUserInfo ¶ added in v0.12.3
DeleteRouteWithTenantIDAndUserInfo DELETE直传API,会在查询参数添加租户ID和用户ID字段,字段名分别为为tenantId,userId和operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func DeleteRouteWithUserID ¶ added in v0.11.11
DeleteRouteWithUserID DELETE直传API,会在查询参数添加用户ID字段,字段名分别为userId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func DeleteRouteWithUserInfo ¶ added in v0.12.3
DeleteRouteWithUserInfo DELETE直传API,会在查询参数添加用户ID字段,字段名分别为userId,还会添加操作者用户名,字段名为operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func GetRoute ¶ added in v0.11.11
GetRoute GET直传API 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func GetRouteWithCreateUserID ¶ added in v0.11.11
GetRouteWithCreateUserID GET直传API,会在查询参数添加用户ID字段,字段名分别为createUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func GetRouteWithDeleteUserID ¶ added in v0.11.11
GetRouteWithDeleteUserID GET直传API,会在查询参数添加用户ID字段,字段名分别为deleteUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func GetRouteWithTenantID ¶ added in v0.11.11
GetRouteWithTenantID GET直传API,会在查询参数添加租户ID字段,字段名分别为tenantId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func GetRouteWithTenantIDAndCreateUserID ¶ added in v0.11.11
GetRouteWithTenantIDAndCreateUserID GET直传API,会在查询参数添加租户ID和用户ID字段,字段名分别为tenantId和createUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func GetRouteWithTenantIDAndDeleteUserID ¶ added in v0.11.11
GetRouteWithTenantIDAndDeleteUserID GET直传API,会在查询参数添加租户ID和用户ID字段,字段名分别为tenantId和deleteUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func GetRouteWithTenantIDAndUpdateUserID ¶ added in v0.11.11
GetRouteWithTenantIDAndUpdateUserID GET直传API,会在查询参数添加租户ID和用户ID字段,字段名分别为tenantId和updateUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func GetRouteWithTenantIDAndUserID ¶ added in v0.11.11
GetRouteWithTenantIDAndUserID GET直传API,会在查询参数添加租户ID和用户ID字段,字段名分别为tenantId和userId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func GetRouteWithUpdateUserID ¶ added in v0.11.11
GetRouteWithUpdateUserID GET直传API,会在查询参数添加用户ID字段,字段名分别为updateUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func GetRouteWithUserID ¶ added in v0.11.11
GetRouteWithUserID GET直传API,会在查询参数添加用户ID字段,字段名分别为userId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PostRoute ¶ added in v0.11.11
PostRoute POST直传API 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PostRouteWithCreateUserID ¶ added in v0.11.11
PostRouteWithCreateUserID POST直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为createUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PostRouteWithCreateUserInfo ¶ added in v0.12.3
PostRouteWithCreateUserInfo POST直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为createUserId,还会添加操作者用户名,字段名为operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PostRouteWithTenantID ¶ added in v0.11.11
PostRouteWithTenantID POST直传API,请求Body是JsonBody,且会添加租户ID字段,字段名分别为tenantId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PostRouteWithTenantIDAndCreateUserID ¶ added in v0.11.11
PostRouteWithTenantIDAndCreateUserID POST直传API,请求Body是JsonBody,且会添加租户ID和用户ID字段,字段名分别为tenantId和createUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PostRouteWithTenantIDAndCreateUserInfo ¶ added in v0.12.3
func PostRouteWithTenantIDAndCreateUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
PostRouteWithTenantIDAndCreateUserInfo POST直传API,请求Body是JsonBody,且会添加租户ID和用户ID字段,字段名分别为为tenantId,userId和operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PostRouteWithTenantIDAndUserID ¶ added in v0.11.11
PostRouteWithTenantIDAndUserID POST直传API,请求Body是JsonBody,且会添加租户ID和用户ID字段,字段名分别为tenantId和userId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PostRouteWithTenantIDAndUserInfo ¶ added in v0.12.3
PostRouteWithTenantIDAndUserInfo POST直传API,请求Body是JsonBody,且会添加租户ID,用户ID以及操作者用户名字段,字段名分别为tenantId,userId和operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PostRouteWithUserID ¶ added in v0.11.11
PostRouteWithUserID POST直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为userId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PostRouteWithUserInfo ¶ added in v0.12.3
PostRouteWithUserInfo POST直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为userId,还会添加操作者用户名,字段名为operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PutRoute ¶ added in v0.11.11
PutRoute PUT直传API 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PutRouteWithTenantID ¶ added in v0.11.11
PutRouteWithTenantID PUT直传API,请求Body是JsonBody,且会添加租户ID字段,字段名分别为tenantId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PutRouteWithTenantIDAndUpdateUserID ¶ added in v0.11.11
PutRouteWithTenantIDAndUpdateUserID PUT直传API,请求Body是JsonBody,且会添加租户ID和用户ID字段,字段名分别为tenantId和updateUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PutRouteWithTenantIDAndUpdateUserInfo ¶ added in v0.12.3
func PutRouteWithTenantIDAndUpdateUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)
PutRouteWithTenantIDAndUpdateUserInfo PUT直传API,请求Body是JsonBody,且会添加租户ID和用户ID字段,字段名分别为为tenantId,userId和operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PutRouteWithTenantIDAndUserID ¶ added in v0.11.11
PutRouteWithTenantIDAndUserID PUT直传API,请求Body是JsonBody,且会添加租户ID和用户ID字段,字段名分别为tenantId和userId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PutRouteWithTenantIDAndUserInfo ¶ added in v0.12.3
PutRouteWithTenantIDAndUserInfo PUT直传API,请求Body是JsonBody,且会添加租户ID和用户ID字段,字段名分别为为tenantId,userId和operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PutRouteWithUpdateUserID ¶ added in v0.11.11
PutRouteWithUpdateUserID PUT直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为updateUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PutRouteWithUpdateUserInfo ¶ added in v0.12.3
PutRouteWithUpdateUserInfo PUT直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为updateUserId,还会添加操作者用户名,字段名为operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PutRouteWithUserID ¶ added in v0.11.11
PutRouteWithUserID PUT直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为createUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
func PutRouteWithUserInfo ¶ added in v0.12.3
PutRouteWithUserInfo PUT直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为createUserId,还会添加操作者用户名,字段名为operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无
Types ¶
type Option ¶ added in v0.11.11
type Option func(options *Options)
func WithAfterRequestCallback ¶ added in v0.11.11
func WithAfterRequestCallback(callback RequestBuilderCallback) Option
WithAfterRequestCallback 设置请求后回调
func WithBeforeRequestCallback ¶ added in v0.11.11
func WithBeforeRequestCallback(callback RequestBuilderCallback) Option
WithBeforeRequestCallback 设置请求前回调
func WithMiddlewares ¶ added in v0.11.11
WithMiddlewares 设置中间件
func WithResponseErrorCallback ¶ added in v0.11.11
func WithResponseErrorCallback(callback gateway.ResponseErrorCallback) Option
WithResponseErrorCallback 设置失败响应回调,默认回调会按照是否存在错误返回MsgResponse
func WithResponseSuccessCallback ¶ added in v0.11.11
func WithResponseSuccessCallback(callback gateway.ResponseSuccessCallback) Option
WithResponseSuccessCallback 设置成功响应回调,默认回调会将服务响应作为网关API的响应返回
func WithTenantIDParamsName ¶ added in v0.11.11
WithTenantIDParamsName 设置请求参数中的租户ID参数的名称
func WithUserIDParamsName ¶ added in v0.11.11
WithUserIDParamsName 设置请求参数中的用户ID参数的名称
func WithUserNameParamsName ¶ added in v0.12.3
WithUserNameParamsName 设置请求参数中的用户名参数的名称
type RequestBuilderCallback ¶ added in v0.11.11
type RequestBuilderCallback func(requestBuilder *gateway.RequestBuilder) error