Create & Init Project...

This commit is contained in:
2019-04-22 18:49:16 +08:00
commit fc4fa37393
25440 changed files with 4054998 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"access.go",
"auth.go",
"job.go",
"log.go",
"message.go",
"tel_bind_log.go",
],
importpath = "go-common/app/job/main/passport/model",
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

View File

@@ -0,0 +1,9 @@
package model
// AccessInfo aso_app_perm table
type AccessInfo struct {
AppID int32 `json:"appid"`
Mid int64 `json:"mid"`
Token string `json:"access_token"`
Expires int64 `json:"expires"`
}

View File

@@ -0,0 +1,11 @@
package model
// AuthToken for auth
type AuthToken struct {
ID int64 `json:"id"`
Mid int64 `json:"mid"`
AppID int64 `json:"appid"`
Token string `json:"token"`
Expires int64 `json:"expires"`
Type int64 `json:"type"`
}

View File

@@ -0,0 +1,13 @@
package model
// Token user access token.
type Token struct {
Mid int64 `json:"mid"`
Appid int64 `json:"appid"`
Subid int64 `json:"appSubid"`
Token string `json:"accessToken"`
RToken string `json:"refreshToken"`
CTime int64 `json:"createAt"`
Expires int64 `json:"expires"`
Type int64 `json:"type"`
}

View File

@@ -0,0 +1,22 @@
package model
// LoginLog login log.
type LoginLog struct {
Mid int64 `json:"mid"`
Timestamp int64 `json:"timestamp"`
LoginIP int64 `json:"loginip"`
Type int64 `json:"type"`
Server string `json:"server"`
}
// PwdLog pwd log.
type PwdLog struct {
ID int64 `json:"id"`
Mid int64 `json:"mid"`
Timestamp int64 `json:"timestamp"`
IP int64 `json:"ip"`
OldPwd string `json:"old_pwd"`
OldSalt string `json:"old_salt"`
NewPwd string `json:"new_pwd"`
NewSalt string `json:"new_salt"`
}

View File

@@ -0,0 +1,21 @@
package model
import (
"encoding/json"
)
// BMsg databus binlog message
type BMsg struct {
Action string `json:"action"`
Table string `json:"table"`
New json.RawMessage `json:"new"`
Old json.RawMessage `json:"old"`
}
// PMsg databus passport message
type PMsg struct {
Action string `json:"action"`
Table string `json:"type"`
Data *Token `json:"data"`
CTime int64 `json:"ctime"`
}

View File

@@ -0,0 +1,17 @@
package model
// TelBindLog bind log
type TelBindLog struct {
ID int64 `json:"id"`
Mid int64 `json:"mid"`
Tel string `json:"tel"`
Timestamp int64 `json:"timestamp"`
}
// EmailBindLog bind log
type EmailBindLog struct {
ID int64 `json:"id"`
Mid int64 `json:"mid"`
Email string `json:"email"`
Timestamp int64 `json:"timestamp"`
}