-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
568 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
### Go template | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, build with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 | ||
.glide/ | ||
### JetBrains template | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff: | ||
.idea/**/workspace.xml | ||
.idea/**/tasks.xml | ||
.idea/dictionaries | ||
|
||
# Sensitive or high-churn files: | ||
.idea/**/dataSources/ | ||
.idea/**/dataSources.ids | ||
.idea/**/dataSources.xml | ||
.idea/**/dataSources.local.xml | ||
.idea/**/sqlDataSources.xml | ||
.idea/**/dynamic.xml | ||
.idea/**/uiDesigner.xml | ||
|
||
# Gradle: | ||
.idea/**/gradle.xml | ||
.idea/**/libraries | ||
|
||
# CMake | ||
cmake-build-debug/ | ||
|
||
# Mongo Explorer plugin: | ||
.idea/**/mongoSettings.xml | ||
|
||
## File-based project format: | ||
*.iws | ||
|
||
## Plugin-specific files: | ||
|
||
# IntelliJ | ||
out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Cursive Clojure plugin | ||
.idea/replstate.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
ignored | ||
.idea/ | ||
*.dat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
# telattr | ||
Telephone Attribution | ||
|
||
## Dev | ||
```bash | ||
# Generate proto data | ||
go-bindata -pkg data_proto -o data_proto/bindata.go phone.pb | ||
``` |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package data_proto | ||
|
||
import "github.com/wenerme/telattr" | ||
|
||
// func Asset(name string) ([]byte, error) { | ||
func init() { | ||
b, err := Asset("phone.pb") | ||
if err != nil { | ||
panic(err) | ||
} | ||
telattr.ProtoData = b | ||
telattr.MustInit() | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
syntax = "proto3"; | ||
package wener.teleattr.v1; | ||
|
||
option go_package = "github.com/wenerme/teleattr/genproto/v1/phonedata;phonedata"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "PhoneDataProto"; | ||
option java_package = "com.github.wenerme.teleattr.v1.phonedata"; | ||
option objc_class_prefix = "WAPI"; | ||
|
||
message PhoneData { | ||
string version = 1; | ||
repeated Record records = 2; | ||
repeated Index indexes = 3; | ||
} | ||
|
||
message Record { | ||
string province = 1; | ||
string city = 2; | ||
string zip = 3; | ||
string zone = 4; | ||
} | ||
|
||
message Index { | ||
int32 prefix = 1; | ||
int32 record_index = 2; | ||
Vendor vendor = 3; | ||
} | ||
|
||
enum Vendor { | ||
UNKNOWN = 0; | ||
CMCC = 1; //中国移动 | ||
CUCC = 2; //中国联通 | ||
CTCC = 3; //中国电信 | ||
CTCC_V = 4; //电信虚拟运营商 | ||
CUCC_V = 5; //联通虚拟运营商 | ||
CMCC_V = 6; //移动虚拟运营商 | ||
} |