# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 1
# self = https://watcher.sour.is/conv/zizugqq
在 grom 中使用反射實現動態建表**
【導讀】在 gorm 中使用反射機制實現依據運行時獲得的數據來創建數據表。在我的畢設 “網絡安全日誌採集儲存系統” 中,我遇到了一個需求——從外部文件中加載模板,並以此對從多臺服務器上採集到的 nginx 訪問日誌 (access log) 進行正則提取,獲得需要的字段並最終儲存到 mysql 中。這裏存在着一個問題,由於需要提取的字段以及字段的命名都來源於外部文件,在程序編譯時是沒辦法知道的,所 ⌘ Read more