Skip to content

Commit

Permalink
Merge pull request #12 from Dot-Liu/develop
Browse files Browse the repository at this point in the history
修改库名
  • Loading branch information
Eolink authored Aug 13, 2021
2 parents 5626c62 + 1a5c5b7 commit e030f0c
Show file tree
Hide file tree
Showing 69 changed files with 210 additions and 208 deletions.
60 changes: 0 additions & 60 deletions app/goku-eosc/inner.go

This file was deleted.

File renamed without changes.
File renamed without changes.
60 changes: 60 additions & 0 deletions app/goku/inner.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package main

import (
"github.com/eolinker/goku/auth/aksk"
"github.com/eolinker/goku/auth/apikey"
"github.com/eolinker/goku/auth/basic"
"github.com/eolinker/goku/auth/jwt"
"github.com/eolinker/goku/discovery/consul"
"github.com/eolinker/goku/discovery/eureka"
"github.com/eolinker/goku/discovery/nacos"
"github.com/eolinker/goku/discovery/static"
http_router "github.com/eolinker/goku/router/http-router"
service_http "github.com/eolinker/goku/service/service-http"
store_memory "github.com/eolinker/goku/store-memory"
upstream_http "github.com/eolinker/goku/upstream/upstream-http"
)

func Register() {
storeRegister()

routerRegister()

serviceRegister()

upstreamRegister()

discoveryRegister()

authRegister()
}

func authRegister() {
basic.Register()
apikey.Register()
aksk.Register()
jwt.Register()
}

func discoveryRegister() {
consul.Register()
eureka.Register()
nacos.Register()
static.Register()
}

func storeRegister() {
store_memory.Register()
}

func upstreamRegister() {
upstream_http.Register()
}

func serviceRegister() {
service_http.Register()
}

func routerRegister() {
http_router.Register()
}
2 changes: 1 addition & 1 deletion app/goku-eosc/main.go → app/goku/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path/filepath"
"runtime"

reader_yaml "github.com/eolinker/goku-eosc/reader-yaml"
reader_yaml "github.com/eolinker/goku/reader-yaml"

_ "net/http/pprof"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions auth/aksk/aksk.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"time"

"github.com/eolinker/eosc"
"github.com/eolinker/goku-eosc/auth"
http_context "github.com/eolinker/goku-eosc/node/http-context"
"github.com/eolinker/goku/auth"
http_context "github.com/eolinker/goku/node/http-context"
)

//supportTypes 当前驱动支持的authorization type值
Expand Down
3 changes: 2 additions & 1 deletion auth/aksk/aksk_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package aksk

import (
http_context "github.com/eolinker/goku-eosc/node/http-context"
"io"
"net/http"
"testing"

http_context "github.com/eolinker/goku/node/http-context"
)

var akskConfig = []AKSKConfig{{
Expand Down
4 changes: 2 additions & 2 deletions auth/aksk/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"fmt"
"strings"

"github.com/eolinker/goku-eosc/auth"
http_context "github.com/eolinker/goku-eosc/node/http-context"
"github.com/eolinker/goku/auth"
http_context "github.com/eolinker/goku/node/http-context"
)

const dateHeader = "x-gateway-date"
Expand Down
4 changes: 2 additions & 2 deletions auth/apikey/apikey.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/eolinker/eosc"
"github.com/eolinker/goku-eosc/auth"
http_context "github.com/eolinker/goku-eosc/node/http-context"
"github.com/eolinker/goku/auth"
http_context "github.com/eolinker/goku/node/http-context"
)

//supportTypes 当前驱动支持的authorization type值
Expand Down
7 changes: 4 additions & 3 deletions auth/apikey/apikey_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ package apikey
import (
"bytes"
"encoding/json"
"github.com/eolinker/goku-eosc/auth"
http_context "github.com/eolinker/goku-eosc/node/http-context"
"errors"
"mime/multipart"
"net/http"
"net/url"
"strings"
"testing"

"github.com/eolinker/goku/auth"
http_context "github.com/eolinker/goku/node/http-context"
)
import "errors"

var (
users = []User{
Expand Down
4 changes: 2 additions & 2 deletions auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"strings"

http_context "github.com/eolinker/goku-eosc/node/http-context"
http_context "github.com/eolinker/goku/node/http-context"
)

const (
Expand All @@ -27,7 +27,7 @@ var (

//CheckSkill 检查能力
func CheckSkill(skill string) bool {
return skill == "github.com/eolinker/goku-eosc/auth.auth.IAuth"
return skill == "github.com/eolinker/goku/auth.auth.IAuth"
}

//IAuth 鉴权接口声明
Expand Down
4 changes: 2 additions & 2 deletions auth/basic/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/eolinker/eosc"

"github.com/eolinker/goku-eosc/auth"
http_context "github.com/eolinker/goku-eosc/node/http-context"
"github.com/eolinker/goku/auth"
http_context "github.com/eolinker/goku/node/http-context"
)

//supportTypes 当前驱动支持的authorization type值
Expand Down
4 changes: 2 additions & 2 deletions auth/basic/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"strings"
"testing"

"github.com/eolinker/goku-eosc/auth"
"github.com/eolinker/goku/auth"

http_context "github.com/eolinker/goku-eosc/node/http-context"
http_context "github.com/eolinker/goku/node/http-context"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions auth/jwt/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"

"github.com/eolinker/eosc"
"github.com/eolinker/goku-eosc/auth"
http_context "github.com/eolinker/goku-eosc/node/http-context"
"github.com/eolinker/goku/auth"
http_context "github.com/eolinker/goku/node/http-context"
)

//supportTypes 当前驱动支持的authorization type值
Expand Down
3 changes: 2 additions & 1 deletion auth/jwt/jwt_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package jwt

import (
http_context "github.com/eolinker/goku-eosc/node/http-context"
"io"
"net/http"
"testing"

http_context "github.com/eolinker/goku/node/http-context"
)

type responseWriter struct{}
Expand Down
2 changes: 1 addition & 1 deletion auth/jwt/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"strings"
"time"

http_context "github.com/eolinker/goku-eosc/node/http-context"
http_context "github.com/eolinker/goku/node/http-context"
)

type jwtToken struct {
Expand Down
2 changes: 1 addition & 1 deletion discovery/consul/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

"github.com/eolinker/eosc/log"
"github.com/eolinker/goku-eosc/discovery"
"github.com/eolinker/goku/discovery"
"github.com/hashicorp/consul/api"
)

Expand Down
2 changes: 1 addition & 1 deletion discovery/consul/consul.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/eolinker/eosc"
"github.com/eolinker/eosc/log"

"github.com/eolinker/goku-eosc/discovery"
"github.com/eolinker/goku/discovery"
)

type consul struct {
Expand Down
2 changes: 1 addition & 1 deletion discovery/consul/consul_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"sync"
"testing"

"github.com/eolinker/goku-eosc/discovery"
"github.com/eolinker/goku/discovery"
)

func TestConsulGetNodes(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion discovery/consul/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"reflect"
"sync"

"github.com/eolinker/goku-eosc/discovery"
"github.com/eolinker/goku/discovery"

"github.com/eolinker/eosc"
)
Expand Down
2 changes: 1 addition & 1 deletion discovery/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var (

//CheckSkill 检查目标技能是否符合
func CheckSkill(skill string) bool {
return skill == "github.com/eolinker/goku-eosc/discovery.discovery.IDiscovery"
return skill == "github.com/eolinker/goku/discovery.discovery.IDiscovery"
}

//IDiscovery 服务发现接口
Expand Down
2 changes: 1 addition & 1 deletion discovery/eureka/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/url"

"github.com/eolinker/eosc/log"
"github.com/eolinker/goku-eosc/discovery"
"github.com/eolinker/goku/discovery"
)

type client struct {
Expand Down
2 changes: 1 addition & 1 deletion discovery/eureka/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"

"github.com/eolinker/eosc"
"github.com/eolinker/goku-eosc/discovery"
"github.com/eolinker/goku/discovery"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion discovery/eureka/eureka.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/eolinker/eosc/log"

"github.com/eolinker/eosc"
"github.com/eolinker/goku-eosc/discovery"
"github.com/eolinker/goku/discovery"
)

type eureka struct {
Expand Down
2 changes: 1 addition & 1 deletion discovery/eureka/eureka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"sync"
"testing"

"github.com/eolinker/goku-eosc/discovery"
"github.com/eolinker/goku/discovery"
)

func TestGetApp(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion discovery/nacos/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/eolinker/eosc/log"

"github.com/eolinker/goku-eosc/discovery"
"github.com/eolinker/goku/discovery"
)

type client struct {
Expand Down
2 changes: 1 addition & 1 deletion discovery/nacos/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"

"github.com/eolinker/eosc"
"github.com/eolinker/goku-eosc/discovery"
"github.com/eolinker/goku/discovery"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion discovery/nacos/nacos.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/eolinker/eosc/log"

"github.com/eolinker/eosc"
"github.com/eolinker/goku-eosc/discovery"
"github.com/eolinker/goku/discovery"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion discovery/nacos/nacos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"sync"
"testing"

"github.com/eolinker/goku-eosc/discovery"
"github.com/eolinker/goku/discovery"
)

func TestGetApp(t *testing.T) {
Expand Down
Loading

0 comments on commit e030f0c

Please sign in to comment.