diff --git a/.gitignore b/.gitignore index c68131d..9f6baa8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *.dll *.so *.dylib +debug # Test binary, built with `go test -c` *.test diff --git a/cmd/debug b/cmd/debug deleted file mode 100755 index 0f24157..0000000 Binary files a/cmd/debug and /dev/null differ diff --git a/cmd/main.go b/cmd/main.go index dae3ffc..1f82f18 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -1,31 +1,35 @@ package main -import ( - "context" - "log" - "net" +// import ( +// "context" +// "log" +// "net" - "git.loafle.net/odds_crawler/odds-crawler-proto/network" - "google.golang.org/grpc" -) +// "git.loafle.net/chrome_devtools_protocol/protocol-go/page" +// cdp "git.loafle.net/odds_crawler/odds-crawler-proto/cdp" +// "google.golang.org/grpc" +// ) -// server is used to implement helloworld.GreeterServer. -type server struct{} +// // server is used to implement helloworld.GreeterServer. +// type server struct{} -// SayHello implements helloworld.GreeterServer -func (s *server) SayHello(ctx context.Context, in *network.NetworkRequest) (*network.NetworkReply, error) { - log.Printf("Received: %v", in.Name) - return &network.NetworkReply{Message: "Hello " + in.Name}, nil -} +// // SayHello implements helloworld.GreeterServer +// func (s *server) Navigate(ctx context.Context, req *cdp.NavigateRequest) (*cdp.NavigateReply, error) { +// log.Printf("Received: %v", req.Url) + +// page.Navigate() + +// return &cdp.NavigateReply{Message: "Hello " + in.Name}, nil +// } func main() { - lis, err := net.Listen("tcp", ":50051") - if err != nil { - log.Fatalf("failed to listen: %v", err) - } - s := grpc.NewServer() - network.RegisterNetworkerServer(s, &server{}) - if err := s.Serve(lis); err != nil { - log.Fatalf("failed to serve: %v", err) - } + // lis, err := net.Listen("tcp", ":50051") + // if err != nil { + // log.Fatalf("failed to listen: %v", err) + // } + // s := grpc.NewServer() + // ocp.RegisterNetworkerServer(s, &server{}) + // if err := s.Serve(lis); err != nil { + // log.Fatalf("failed to serve: %v", err) + // } } diff --git a/go.mod b/go.mod index cb48f24..b67b904 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,8 @@ go 1.12 require ( cloud.google.com/go v0.37.4 // indirect - git.loafle.net/odds_crawler/odds-crawler-proto v0.0.0-20190501132318-747705e28f94 + git.loafle.net/chrome_devtools_protocol/protocol-go v0.0.0-20190420120325-5b4a2c84e461 + git.loafle.net/odds_crawler/odds-crawler-proto v0.0.0-20190509143834-a3001ddaef17 github.com/golang/protobuf v1.3.1 // indirect github.com/google/btree v1.0.0 // indirect github.com/google/go-cmp v0.3.0 // indirect diff --git a/go.sum b/go.sum index 96d3828..3367751 100644 --- a/go.sum +++ b/go.sum @@ -1,10 +1,18 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= +git.loafle.net/chrome_devtools_protocol/protocol-go v0.0.0-20190420120325-5b4a2c84e461 h1:aLFOMFRb3aHF2ZRiGdLBqf198pcy4kCg3QCWn5TSObA= +git.loafle.net/chrome_devtools_protocol/protocol-go v0.0.0-20190420120325-5b4a2c84e461/go.mod h1:YquKMkEKjSo/hHQDQsoPs5V8zi79klC7/OhehmZekI8= git.loafle.net/odds_crawler/odds-crawler-proto v0.0.0-20190501104040-9bc12a7a90fe h1:tsX2pe5I3Da3wDtTHiJ00Gk26OZiCbvtFMotnxLYVio= git.loafle.net/odds_crawler/odds-crawler-proto v0.0.0-20190501104040-9bc12a7a90fe/go.mod h1:ZCgzl5JJqflmR868uBsp1IGF0Kx4pEvOK4iv+Sh3I1U= git.loafle.net/odds_crawler/odds-crawler-proto v0.0.0-20190501132318-747705e28f94 h1:PfQET6aofcX8943OFSYemkjE3Zfd50kK5QiIkfLfkaY= git.loafle.net/odds_crawler/odds-crawler-proto v0.0.0-20190501132318-747705e28f94/go.mod h1:ZCgzl5JJqflmR868uBsp1IGF0Kx4pEvOK4iv+Sh3I1U= +git.loafle.net/odds_crawler/odds-crawler-proto v0.0.0-20190508170539-4fd5bafaf1c9 h1:PpqAEllhmN01HMuaaoZYV4AcUUBMMnrY+Y1qpd4oNYs= +git.loafle.net/odds_crawler/odds-crawler-proto v0.0.0-20190508171242-e500dd494358 h1:e0jrnklSQXFjkim5FQNmcoyPYiRCaVbHjcnJp1OykUc= +git.loafle.net/odds_crawler/odds-crawler-proto v0.0.0-20190508171831-9b2d6aad67db h1:OhyqGjNGYuHdWEPmR68RafLA1qebj8QY9iPAOCIiRd0= +git.loafle.net/odds_crawler/odds-crawler-proto v0.0.0-20190508171831-9b2d6aad67db/go.mod h1:ZCgzl5JJqflmR868uBsp1IGF0Kx4pEvOK4iv+Sh3I1U= +git.loafle.net/odds_crawler/odds-crawler-proto v0.0.0-20190509143834-a3001ddaef17 h1:LH5DctE78HpB3E4d5EIW2focLwkP5SylE6Db60UqGGU= +git.loafle.net/odds_crawler/odds-crawler-proto v0.0.0-20190509143834-a3001ddaef17/go.mod h1:ZCgzl5JJqflmR868uBsp1IGF0Kx4pEvOK4iv+Sh3I1U= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/zstd v1.3.6-0.20190409195224-796139022798/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= @@ -31,6 +39,7 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -58,9 +67,13 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knq/sysutil v0.0.0-20181215143952-f05b59f0f307 h1:vl4eIlySbjertFaNwiMjXsGrFVK25aOWLq7n+3gh2ls= +github.com/knq/sysutil v0.0.0-20181215143952-f05b59f0f307/go.mod h1:BjPj+aVjl9FW/cCGiF3nGh5v+9Gd3VCgBQbod/GlMaQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983 h1:wL11wNW7dhKIcRCHSm4sHKPWz0tt4mwBsVodG7+Xyqg= +github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= diff --git a/init/.gitkeep b/init/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/internal/.gitkeep b/internal/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/internal/app/.gitkeep b/internal/app/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/internal/pkg/.gitkeep b/internal/pkg/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/pkg/.gitkeep b/pkg/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/scripts/.gitkeep b/scripts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/third_party/.gitkeep b/third_party/.gitkeep new file mode 100644 index 0000000..e69de29