serverless-transitcode

module
v0.0.0-...-97766fc Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: GPL-3.0

README


一个用于转码/加解密的 Serverless 云函数。
a serverless application for converting codes(base64, url, html, unicode, utf8<\>GBK)

涉及云函数操作

  • 触发器:API 网关
  • 代码配置 :本地上传 zip 包

目前支持的格式

  • Base64 加/解密
  • Html 编码/解码
  • Url 编码/解码
  • Unicode 编码/解码
  • Utf8<=>GBK 编码/解码

操作

根据命令行生成一个执行文件的压缩包

$ chmod 755 src/build.sh
$ ./src/build.sh

上传压缩到「腾讯云」云函数-函数服务-函数管理-函数代码中。

请求结构

{
    "opt": 1,
    "content": "测试编码与转码 https://or2.in/#check"
}

返回案例

{
    "origin": "测试编码与转码 https://or2.in/#check",
    "base64": "5rWL6K+V57yW56CB5LiO6L2s56CBIGh0dHBzOi8vb3IyLmluLyNjaGVjaw==",
    "html": "测试编码与转码 https://or2.in/#check",
    "unicode":"\测\试\编\码\与\转\码 https://or2.in/#check",
    "url": "%E6%B5%8B%E8%AF%95%E7%BC%96%E7%A0%81%E4%B8%8E%E8%BD%AC%E7%A0%81+https%3A%2F%2For2.in%2F%23check",
    "utf8ToGbk": "���Ա�����ת�� https://or2.in/#check"
}

展示

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

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