pass_through

package
v1.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteRoute added in v0.11.11

func DeleteRoute(builder *gateway.Builder, params *Simple, opts ...Option)

DeleteRoute DELETE直传API 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func DeleteRouteWithDeleteUserID added in v0.11.11

func DeleteRouteWithDeleteUserID(builder *gateway.Builder, params *Simple, opts ...Option)

DeleteRouteWithDeleteUserID DELETE直传API,会在查询参数添加用户ID字段,字段名分别为deleteUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func DeleteRouteWithDeleteUserInfo added in v0.12.3

func DeleteRouteWithDeleteUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)

DeleteRouteWithDeleteUserInfo DELETE直传API,会在查询参数添加用户ID字段,字段名分别为deleteUserId,还会添加操作者用户名,字段名为operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func DeleteRouteWithTenantID added in v0.11.11

func DeleteRouteWithTenantID(builder *gateway.Builder, params *Simple, opts ...Option)

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

func DeleteRouteWithTenantIDAndUserID(builder *gateway.Builder, params *Simple, opts ...Option)

DeleteRouteWithTenantIDAndUserID DELETE直传API,会在查询参数添加租户ID和用户ID字段,字段名分别为tenantId和userId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func DeleteRouteWithTenantIDAndUserInfo added in v0.12.3

func DeleteRouteWithTenantIDAndUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)

DeleteRouteWithTenantIDAndUserInfo DELETE直传API,会在查询参数添加租户ID和用户ID字段,字段名分别为为tenantId,userId和operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func DeleteRouteWithUserID added in v0.11.11

func DeleteRouteWithUserID(builder *gateway.Builder, params *Simple, opts ...Option)

DeleteRouteWithUserID DELETE直传API,会在查询参数添加用户ID字段,字段名分别为userId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func DeleteRouteWithUserInfo added in v0.12.3

func DeleteRouteWithUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)

DeleteRouteWithUserInfo DELETE直传API,会在查询参数添加用户ID字段,字段名分别为userId,还会添加操作者用户名,字段名为operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func GetRoute added in v0.11.11

func GetRoute(builder *gateway.Builder, params *Simple, opts ...Option)

GetRoute GET直传API 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func GetRouteWithCreateUserID added in v0.11.11

func GetRouteWithCreateUserID(builder *gateway.Builder, params *Simple, opts ...Option)

GetRouteWithCreateUserID GET直传API,会在查询参数添加用户ID字段,字段名分别为createUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func GetRouteWithDeleteUserID added in v0.11.11

func GetRouteWithDeleteUserID(builder *gateway.Builder, params *Simple, opts ...Option)

GetRouteWithDeleteUserID GET直传API,会在查询参数添加用户ID字段,字段名分别为deleteUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func GetRouteWithTenantID added in v0.11.11

func GetRouteWithTenantID(builder *gateway.Builder, params *Simple, opts ...Option)

GetRouteWithTenantID GET直传API,会在查询参数添加租户ID字段,字段名分别为tenantId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func GetRouteWithTenantIDAndCreateUserID added in v0.11.11

func GetRouteWithTenantIDAndCreateUserID(builder *gateway.Builder, params *Simple, opts ...Option)

GetRouteWithTenantIDAndCreateUserID GET直传API,会在查询参数添加租户ID和用户ID字段,字段名分别为tenantId和createUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func GetRouteWithTenantIDAndDeleteUserID added in v0.11.11

func GetRouteWithTenantIDAndDeleteUserID(builder *gateway.Builder, params *Simple, opts ...Option)

GetRouteWithTenantIDAndDeleteUserID GET直传API,会在查询参数添加租户ID和用户ID字段,字段名分别为tenantId和deleteUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func GetRouteWithTenantIDAndUpdateUserID added in v0.11.11

func GetRouteWithTenantIDAndUpdateUserID(builder *gateway.Builder, params *Simple, opts ...Option)

GetRouteWithTenantIDAndUpdateUserID GET直传API,会在查询参数添加租户ID和用户ID字段,字段名分别为tenantId和updateUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func GetRouteWithTenantIDAndUserID added in v0.11.11

func GetRouteWithTenantIDAndUserID(builder *gateway.Builder, params *Simple, opts ...Option)

GetRouteWithTenantIDAndUserID GET直传API,会在查询参数添加租户ID和用户ID字段,字段名分别为tenantId和userId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func GetRouteWithUpdateUserID added in v0.11.11

func GetRouteWithUpdateUserID(builder *gateway.Builder, params *Simple, opts ...Option)

GetRouteWithUpdateUserID GET直传API,会在查询参数添加用户ID字段,字段名分别为updateUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func GetRouteWithUserID added in v0.11.11

func GetRouteWithUserID(builder *gateway.Builder, params *Simple, opts ...Option)

GetRouteWithUserID GET直传API,会在查询参数添加用户ID字段,字段名分别为userId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PostRoute added in v0.11.11

func PostRoute(builder *gateway.Builder, params *Simple, opts ...Option)

PostRoute POST直传API 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PostRouteWithCreateUserID added in v0.11.11

func PostRouteWithCreateUserID(builder *gateway.Builder, params *Simple, opts ...Option)

PostRouteWithCreateUserID POST直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为createUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PostRouteWithCreateUserInfo added in v0.12.3

func PostRouteWithCreateUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)

PostRouteWithCreateUserInfo POST直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为createUserId,还会添加操作者用户名,字段名为operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PostRouteWithTenantID added in v0.11.11

func PostRouteWithTenantID(builder *gateway.Builder, params *Simple, opts ...Option)

PostRouteWithTenantID POST直传API,请求Body是JsonBody,且会添加租户ID字段,字段名分别为tenantId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PostRouteWithTenantIDAndCreateUserID added in v0.11.11

func PostRouteWithTenantIDAndCreateUserID(builder *gateway.Builder, params *Simple, opts ...Option)

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

func PostRouteWithTenantIDAndUserID(builder *gateway.Builder, params *Simple, opts ...Option)

PostRouteWithTenantIDAndUserID POST直传API,请求Body是JsonBody,且会添加租户ID和用户ID字段,字段名分别为tenantId和userId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PostRouteWithTenantIDAndUserInfo added in v0.12.3

func PostRouteWithTenantIDAndUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)

PostRouteWithTenantIDAndUserInfo POST直传API,请求Body是JsonBody,且会添加租户ID,用户ID以及操作者用户名字段,字段名分别为tenantId,userId和operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PostRouteWithUserID added in v0.11.11

func PostRouteWithUserID(builder *gateway.Builder, params *Simple, opts ...Option)

PostRouteWithUserID POST直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为userId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PostRouteWithUserInfo added in v0.12.3

func PostRouteWithUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)

PostRouteWithUserInfo POST直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为userId,还会添加操作者用户名,字段名为operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PutRoute added in v0.11.11

func PutRoute(builder *gateway.Builder, params *Simple, opts ...Option)

PutRoute PUT直传API 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PutRouteWithTenantID added in v0.11.11

func PutRouteWithTenantID(builder *gateway.Builder, params *Simple, opts ...Option)

PutRouteWithTenantID PUT直传API,请求Body是JsonBody,且会添加租户ID字段,字段名分别为tenantId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PutRouteWithTenantIDAndUpdateUserID added in v0.11.11

func PutRouteWithTenantIDAndUpdateUserID(builder *gateway.Builder, params *Simple, opts ...Option)

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

func PutRouteWithTenantIDAndUserID(builder *gateway.Builder, params *Simple, opts ...Option)

PutRouteWithTenantIDAndUserID PUT直传API,请求Body是JsonBody,且会添加租户ID和用户ID字段,字段名分别为tenantId和userId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PutRouteWithTenantIDAndUserInfo added in v0.12.3

func PutRouteWithTenantIDAndUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)

PutRouteWithTenantIDAndUserInfo PUT直传API,请求Body是JsonBody,且会添加租户ID和用户ID字段,字段名分别为为tenantId,userId和operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PutRouteWithUpdateUserID added in v0.11.11

func PutRouteWithUpdateUserID(builder *gateway.Builder, params *Simple, opts ...Option)

PutRouteWithUpdateUserID PUT直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为updateUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PutRouteWithUpdateUserInfo added in v0.12.3

func PutRouteWithUpdateUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)

PutRouteWithUpdateUserInfo PUT直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为updateUserId,还会添加操作者用户名,字段名为operatorUserName 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PutRouteWithUserID added in v0.11.11

func PutRouteWithUserID(builder *gateway.Builder, params *Simple, opts ...Option)

PutRouteWithUserID PUT直传API,请求Body是JsonBody,且会添加用户ID字段,字段名分别为createUserId 参数: - builder: 该网关API构建器 - params: 网关直通参数 - opts: 网关直通选项 返回值: 无

func PutRouteWithUserInfo added in v0.12.3

func PutRouteWithUserInfo(builder *gateway.Builder, params *Simple, opts ...Option)

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

func WithMiddlewares(middlewares ...gateway.Handler) Option

WithMiddlewares 设置中间件

func WithResponseErrorCallback added in v0.11.11

func WithResponseErrorCallback(callback RequestBuilderErrCallback) Option

WithResponseErrorCallback 设置失败响应回调,默认回调会按照是否存在错误返回MsgResponse

func WithResponseSuccessCallback added in v0.11.11

func WithResponseSuccessCallback(callback RequestBuilderCallback) Option

WithResponseSuccessCallback 设置成功响应回调,默认回调会将服务响应作为网关API的响应返回

func WithTenantIDParamsName added in v0.11.11

func WithTenantIDParamsName(tenantIDParamsName string) Option

WithTenantIDParamsName 设置请求参数中的租户ID参数的名称

func WithUserIDParamsName added in v0.11.11

func WithUserIDParamsName(userIDParamsName string) Option

WithUserIDParamsName 设置请求参数中的用户ID参数的名称

func WithUserNameParamsName added in v0.12.3

func WithUserNameParamsName(userNameParamsName string) Option

WithUserNameParamsName 设置请求参数中的用户名参数的名称

type Options added in v0.11.11

type Options struct {
	// contains filtered or unexported fields
}

type RequestBuilderCallback added in v0.11.11

type RequestBuilderCallback func(c *gateway.RequestBuilderContext) error

type RequestBuilderErrCallback added in v1.3.1

type RequestBuilderErrCallback func(c *gateway.RequestBuilderContext, err error) error

type Simple added in v0.11.11

type Simple struct {
	// RelativePath 网关开放API的RelativePath
	RelativePath string

	// 服务的URL
	ServiceUrl string
}

Simple 参数

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL