资源简介
本资源为bilibili(B站)后端源代码,主体为Go语言,仅供学习使用,请勿用于商业。欢迎有需要的朋友下载。
代码片段和文件信息
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2017-12-25 下午2:43
# @Author : Hedan (hedan@bilibili.com)
# @file : databusTest
import json
import redis
# [databus]
# key = “4ba46ba31f9a44ef“
# secret = “99985eb4451cfb1b899ca0fbe3c4bdc8“
# group = “AccountLog-MainAccount-P“
# topic = “AccountLog-T“
# action = “pub“
# name = “member-service/databus“
# proto = “tcp“
# addr = “172.16.33.158:6205“
# idle = 100
# active = 100
# dialTimeout = “1s“
# readTimeout = “60s“
# writeTimeout = “1s“
# idleTimeout = “10s“
“““参考文档 http://info.bilibili.co/pages/viewpage.action?pageId=3670491
key 服务配置中databus的key
value 服务配置中databus的value
host和port 配置服务中databus的host和port
group-topic 一个group对应一个topic(开发申请)
“““
#每日登录 passport 获得5经验值
# data_passport ={
# ‘mid‘:4780461
# ‘loginip‘:1726481463
# “timestamp“:1516517576
# }
# auth_passport = ‘4ba46ba31f9a44ef:99985eb4451cfb1b899ca0fbe3c4bdc8@PassportLog-MainAccount-P/topic=PassportLog-T&role=pub&offset=new‘
# rc = redis.Redis(host=‘172.16.33.158‘ port=6205 socket_keepalive=True)
# print rc.execute_command(‘auth‘auth_passport)
# msg = json.dumps(data_passport ensure_ascii=False)
# rc.set(“1023“ msg)
# 每日登录 account 获得5经验值
# data_passport ={
# ‘mid‘:110000092
# ‘loginip‘:1726481463
# “timestamp“:1516517576
# }
# auth_passport = ‘4ba46ba31f9a44ef:99985eb4451cfb1b899ca0fbe3c4bdc8@AccountLoginAward-MainAccount-P/topic=AccountLoginAward-T&role=pub&offset=new‘
# rc = redis.Redis(host=‘172.16.33.158‘ port=6205 socket_keepalive=True)
# print rc.execute_command(‘auth‘auth_passport)
# msg = json.dumps(data_passport ensure_ascii=False)
# rc.set(“1023“ msg)
# 每日首次分享视频 archive 获得5经验值
# data_archive ={
# ‘event‘:“share“
# ‘mid‘:110000092
# ‘ip‘:“127.0.0.1“
# “ts“:111
# }
# auth_archive = ‘4ba46ba31f9a44ef:99985eb4451cfb1b899ca0fbe3c4bdc8@AccountExp-MainAccount-P/topic=AccountExp-T&role=pub&offset=new‘
# rc = redis.Redis(host=‘172.16.33.158‘ port=6205 socket_keepalive=True)
# print rc.execute_command(‘auth‘auth_archive)
# msg = json.dumps(data_archive ensure_ascii=False)
# rc.set(“1023“ msg)
#
#
# 每日首次分享视频 archive 获得5经验值
data_archive ={
‘event‘:“view“
# ‘mid‘:110000092
‘mid‘:4780461
‘ip‘:“127.0.0.1“
“ts“:1521745000
}
auth_archive = ‘4ba46ba31f9a44ef:99985eb4451cfb1b899ca0fbe3c4bdc8@AccountExp-MainAccount-P/topic=AccountExp-T&role=pub&offset=new‘
rc = redis.Redis(host=‘172.16.33.158‘ port=6205 socket_keepalive=True)
print rc.execute_command(‘auth‘auth_archive)
msg = json.dumps(data_archive ensure_ascii=False)
rc.set(“1023“ msg)
# 每日首次观看 history 获得5经验值
# data_history ={
# “action“:“insert“
# “table“:“aso_account“
# “data“:{“mid“:110000193
# “userid“:“test_dan06“
# “uname“:“test_dan08“
# “pwd“:“6cfbf96b8f0eb2e0a82b46a4236e8883“
# “salt“:“D8fd30Kj“
# “email“:“169d9106a74d5e95de71be6cf373af04“
#
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-04-22 08:48 bilibili_fork-master\
目录 0 2019-04-22 08:48 bilibili_fork-master\app\
目录 0 2019-04-22 08:48 bilibili_fork-master\app\admin\
目录 0 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\
文件 332 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\BUILD
目录 0 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\
文件 578 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\BUILD
文件 30 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\CHANGELOG.md
目录 0 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\cmd\
文件 1018 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\cmd\BUILD
文件 1036 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\cmd\main.go
目录 0 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\configs\
文件 33 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\configs\application.toml
文件 0 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\configs\grpc.toml
文件 55 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\configs\http.toml
文件 202 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\configs\memcache.toml
文件 583 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\configs\mysql.toml
文件 192 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\configs\redis.toml
文件 37 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\CONTRIBUTORS.md
目录 0 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\internal\
目录 0 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\internal\dao\
文件 921 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\internal\dao\BUILD
文件 1961 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\internal\dao\dao.go
目录 0 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\internal\model\
文件 603 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\internal\model\BUILD
文件 14 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\internal\model\model.go
目录 0 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\internal\server\
目录 0 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\internal\server\http\
文件 936 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\internal\server\http\BUILD
文件 1198 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\internal\server\http\http.go
目录 0 2019-04-22 08:48 bilibili_fork-master\app\admin\bbq\comment\internal\service\
............此处省略30600个文件信息
相关资源
- 影视APP双端源码 前端后端统统都有
- go语言vscode开发的工具
- Go语言学习笔记.雨痕(详细书签)
- B站经典课程,bootstrap 从入门到精通(
- meven+ssm+shiro实现前后端分离登录小案
- go in action 中文版及英文版
- SSM框架,仿《简书》整站无后台管理
- 《分布式缓存-原理、架构及Go语言实
- 禾匠独立版前后端3.1.40.zip
- 狮子鱼独立版12.8.0亲测可用含直播、
- 禾匠榜店小程序商城V4独立版V4.0.25前
- E-cology8管理员后端维护手册(全套)
- 答题小程序完整版源码前端+后端+测试
- 禾匠榜店小程序商城V4独立版4.0.25前后
- 微信电商小程序前后端代码
- 微信小程序源码-喵喵小说-有前端有后
- 柚子黑卡城市社交电商小程序V4.6.0完
- 狮子鱼社区团购小程序7.2.0小程序前端
- golang 资料大全
- 大型网站性能优化实战从前端网络
- 最新b站后端源码,学习使用
- 一个带有数据库的完整版本的旅游网
- Go语言编程入门与实战技巧
- Go语言实战,高清PDF,文字版,带书签
- 啦啦外卖16.4.0 小程序前端+后端
- Go语言并发之道
- Go语言并发之道 [美] 凯瑟琳Katherine
- creator棋牌十三水前后端源码
- 独立版3.1.7前后端.zip
- 架构整洁之道
评论
共有 条评论