project: rename project
parent
8d4829aa54
commit
af8d6c78cc
|
@ -27,7 +27,7 @@ linters-settings:
|
||||||
gofmt:
|
gofmt:
|
||||||
simplify: true
|
simplify: true
|
||||||
goimports:
|
goimports:
|
||||||
local-prefixes: github.com/fbonhomm/LZSS/source
|
local-prefixes: github.com/fbonhomm/api-go-example/source
|
||||||
gocyclo:
|
gocyclo:
|
||||||
min-complexity: 10
|
min-complexity: 10
|
||||||
maligned:
|
maligned:
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module github.com/fbonhomm/api-go
|
module github.com/fbonhomm/api-go-example
|
||||||
|
|
||||||
go 1.12
|
go 1.12
|
||||||
|
|
||||||
|
|
4
main.go
4
main.go
|
@ -11,8 +11,8 @@ import (
|
||||||
|
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
|
|
||||||
"github.com/fbonhomm/api-go/source/routers"
|
"github.com/fbonhomm/api-go-example/source/routers"
|
||||||
"github.com/fbonhomm/api-go/source/services"
|
"github.com/fbonhomm/api-go-example/source/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
// init
|
// init
|
||||||
|
|
|
@ -11,9 +11,9 @@ import (
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
"github.com/fbonhomm/api-go/source/libs"
|
"github.com/fbonhomm/api-go-example/source/libs"
|
||||||
"github.com/fbonhomm/api-go/source/models"
|
"github.com/fbonhomm/api-go-example/source/models"
|
||||||
"github.com/fbonhomm/api-go/source/services"
|
"github.com/fbonhomm/api-go-example/source/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AuthLogin
|
// AuthLogin
|
||||||
|
|
|
@ -11,8 +11,8 @@ import (
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
"github.com/fbonhomm/api-go/source/models"
|
"github.com/fbonhomm/api-go-example/source/models"
|
||||||
"github.com/fbonhomm/api-go/source/services"
|
"github.com/fbonhomm/api-go-example/source/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UserCreate
|
// UserCreate
|
||||||
|
|
|
@ -12,8 +12,8 @@ import (
|
||||||
|
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
|
|
||||||
"github.com/fbonhomm/api-go/source/models"
|
"github.com/fbonhomm/api-go-example/source/models"
|
||||||
"github.com/fbonhomm/api-go/source/services"
|
"github.com/fbonhomm/api-go-example/source/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GenerateAccessToken
|
// GenerateAccessToken
|
||||||
|
|
|
@ -12,8 +12,8 @@ import (
|
||||||
|
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
|
|
||||||
"github.com/fbonhomm/api-go/source/models"
|
"github.com/fbonhomm/api-go-example/source/models"
|
||||||
"github.com/fbonhomm/api-go/source/services"
|
"github.com/fbonhomm/api-go-example/source/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GenerateRefreshToken
|
// GenerateRefreshToken
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
"github.com/fbonhomm/api-go/source/libs"
|
"github.com/fbonhomm/api-go-example/source/libs"
|
||||||
"github.com/fbonhomm/api-go/source/services"
|
"github.com/fbonhomm/api-go-example/source/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Auth(c *gin.Context) {
|
func Auth(c *gin.Context) {
|
||||||
|
|
|
@ -9,9 +9,9 @@ package routers
|
||||||
import (
|
import (
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
"github.com/fbonhomm/api-go/source/controllers"
|
"github.com/fbonhomm/api-go-example/source/controllers"
|
||||||
"github.com/fbonhomm/api-go/source/middlewares"
|
"github.com/fbonhomm/api-go-example/source/middlewares"
|
||||||
"github.com/fbonhomm/api-go/source/validators"
|
"github.com/fbonhomm/api-go-example/source/validators"
|
||||||
)
|
)
|
||||||
|
|
||||||
// main
|
// main
|
||||||
|
|
|
@ -9,9 +9,9 @@ package routers
|
||||||
import (
|
import (
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
"github.com/fbonhomm/api-go/source/controllers"
|
"github.com/fbonhomm/api-go-example/source/controllers"
|
||||||
"github.com/fbonhomm/api-go/source/middlewares"
|
"github.com/fbonhomm/api-go-example/source/middlewares"
|
||||||
"github.com/fbonhomm/api-go/source/validators"
|
"github.com/fbonhomm/api-go-example/source/validators"
|
||||||
)
|
)
|
||||||
|
|
||||||
// main
|
// main
|
||||||
|
|
|
@ -15,7 +15,7 @@ import (
|
||||||
// initialize dialects
|
// initialize dialects
|
||||||
_ "github.com/jinzhu/gorm/dialects/postgres"
|
_ "github.com/jinzhu/gorm/dialects/postgres"
|
||||||
|
|
||||||
"github.com/fbonhomm/api-go/source/models"
|
"github.com/fbonhomm/api-go-example/source/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Db *gorm.DB
|
var Db *gorm.DB
|
||||||
|
|
|
@ -15,8 +15,8 @@ import (
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
|
|
||||||
"github.com/fbonhomm/api-go/source/services"
|
"github.com/fbonhomm/api-go-example/source/services"
|
||||||
"github.com/fbonhomm/api-go/test/fixture"
|
"github.com/fbonhomm/api-go-example/test/fixture"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Token struct {
|
type Token struct {
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"github.com/fbonhomm/api-go/test/fixture"
|
"github.com/fbonhomm/api-go-example/test/fixture"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestGetId
|
// TestGetId
|
||||||
|
|
|
@ -14,9 +14,9 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/fbonhomm/api-go/source/models"
|
"github.com/fbonhomm/api-go-example/source/models"
|
||||||
"github.com/fbonhomm/api-go/source/routers"
|
"github.com/fbonhomm/api-go-example/source/routers"
|
||||||
"github.com/fbonhomm/api-go/source/services"
|
"github.com/fbonhomm/api-go-example/source/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RequestApiJson
|
// RequestApiJson
|
||||||
|
|
|
@ -15,7 +15,7 @@ import (
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"github.com/fbonhomm/api-go/source/validators"
|
"github.com/fbonhomm/api-go-example/source/validators"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestShouldSuccessValidatorUserCreate
|
// TestShouldSuccessValidatorUserCreate
|
||||||
|
|
Loading…
Reference in New Issue