分类目录归档:backend

[ vscode插件REST CLIENT ]


VSCODE类似postman的请求插件

api.http

@host = 127.0.0.1
@port = 8001
@token = d2f8876850f9ddd904f8653466aa980e6433c7fe
@baseUrl = http://{{host}}:{{port}}

### 1. stock_item全部数据获取 
# @name login
GET {{baseUrl}}/api/stock/get_stock_item_with_num_of_child/ HTTP/1.1
content-type: application/json
Authorization

< Read more >

[ go使用pdf ]


gopdf gopdf is a simple library for generating PDF document written in Go lang.

A minimum version of Go 1.13 is required.

Features Unicode subfont embedding. (Chinese, Japanese, Korean, etc.) Draw line, oval, rect, curve Draw image ( jpg, png ) Set image mask Password protection Font kerning Install

< Read more >

[ golang使用excel ]


golang中使用excel并使用http返回

下载

github.com/xuri/excelize/v2

文档

按列赋值

func (f *File) SetSheetCol(sheet, cell string, slice interface{}) error

根据给定的工作表名称、起始坐标和 slice 类型引用按列赋值。例如,在名为 Sheet1 的工作表 B 列上,以 B6 单元格作为起始坐标按列赋值:

err := f.SetSheetCol("Sheet1", "B6", &[]interface{}{"1&quo

< Read more >

[ python生成pdf ]


生成Pdf

  1. 页眉, 页尾, 画图, 表格, 画线...
from reportlab.pdfbase import pdfmetrics   # 注册字体
from reportlab.pdfbase.ttfonts import TTFont # 字体类
from reportlab.platypus import Table, SimpleDocTemplate, Paragraph, Image ,Frame, PageTemplate, Spacer, TableStyle, BaseDocTemplate# 报告内容相关类,
from reportlab.lib.pagesize

< Read more >