更改: 包地址为code.gitlink.org.cn
This commit is contained in:
parent
490e0513ab
commit
408e57b0ad
|
@ -12,6 +12,8 @@ server:
|
|||
grpc_port: 8022
|
||||
read_timeout: 60
|
||||
write_timeout: 60
|
||||
public_key_path: 'public_key.pem'
|
||||
private_key_path: 'private_key.pem'
|
||||
database:
|
||||
type: 'mysql'
|
||||
user: 'root'
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
package global
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/config"
|
||||
"github.com/go-redis/redis"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/viletyy/yolk/crypt"
|
||||
"gitlink.org.cn/Gitlink/account-server/config"
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module gitlink.org.cn/Gitlink/account-server
|
||||
module code.gitlink.org.cn/Gitlink/account-server.git
|
||||
|
||||
go 1.15
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
package initialize
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/internal/job"
|
||||
"github.com/robfig/cron/v3"
|
||||
"gitlink.org.cn/Gitlink/account-server/internal/job"
|
||||
)
|
||||
|
||||
func Cron() {
|
||||
|
|
|
@ -9,7 +9,7 @@ package initialize
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"gorm.io/driver/mysql"
|
||||
"gorm.io/driver/postgres"
|
||||
"gorm.io/gorm"
|
||||
|
|
|
@ -9,8 +9,8 @@ package initialize
|
|||
import (
|
||||
"net"
|
||||
|
||||
pb "gitlink.org.cn/Gitlink/account-server/proto"
|
||||
grpc_server "gitlink.org.cn/Gitlink/account-server/server"
|
||||
pb "code.gitlink.org.cn/Gitlink/account-server.git/proto"
|
||||
grpc_server "code.gitlink.org.cn/Gitlink/account-server.git/server"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/reflection"
|
||||
)
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
"gitlink.org.cn/Gitlink/account-server/internal/routers"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/internal/routers"
|
||||
)
|
||||
|
||||
func RunHttpServer(port string) error {
|
||||
|
|
|
@ -3,8 +3,8 @@ package initialize
|
|||
import (
|
||||
"io/ioutil"
|
||||
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"github.com/viletyy/yolk/crypt"
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
)
|
||||
|
||||
func InitKeys() *crypt.RsaCrypt {
|
||||
|
|
|
@ -9,8 +9,8 @@ package initialize
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"github.com/go-redis/redis"
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
)
|
||||
|
||||
func Redis() *redis.Client {
|
||||
|
|
|
@ -10,10 +10,10 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/viletyy/yolk/convert"
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
)
|
||||
|
||||
func Viper() *viper.Viper {
|
||||
|
|
|
@ -10,9 +10,9 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/pkg"
|
||||
"github.com/viletyy/yolk/directory"
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
"gitlink.org.cn/Gitlink/account-server/pkg"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/internal/service"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/pkg/app"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/pkg/errcode"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/viletyy/yolk/convert"
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
"gitlink.org.cn/Gitlink/account-server/internal/service"
|
||||
"gitlink.org.cn/Gitlink/account-server/pkg/app"
|
||||
"gitlink.org.cn/Gitlink/account-server/pkg/errcode"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package dao
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/internal/model"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/pkg/app"
|
||||
"github.com/viletyy/yolk/crypt"
|
||||
"gitlink.org.cn/Gitlink/account-server/internal/model"
|
||||
"gitlink.org.cn/Gitlink/account-server/pkg/app"
|
||||
)
|
||||
|
||||
func (d *Dao) RegisterUser(username string, password string, nickname string) (model.User, error) {
|
||||
|
|
|
@ -10,8 +10,8 @@ import (
|
|||
"bytes"
|
||||
"time"
|
||||
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
package middleware
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
)
|
||||
|
||||
func AppInfo() gin.HandlerFunc {
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
package middleware
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/pkg/app"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/pkg/errcode"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/golang-jwt/jwt"
|
||||
"gitlink.org.cn/Gitlink/account-server/pkg/app"
|
||||
"gitlink.org.cn/Gitlink/account-server/pkg/errcode"
|
||||
)
|
||||
|
||||
func JWT() gin.HandlerFunc {
|
||||
|
|
|
@ -9,13 +9,13 @@ package routers
|
|||
import (
|
||||
"time"
|
||||
|
||||
_ "code.gitlink.org.cn/Gitlink/account-server.git/docs"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/internal/controller/api"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/internal/middleware"
|
||||
"github.com/gin-gonic/gin"
|
||||
ginSwagger "github.com/swaggo/gin-swagger"
|
||||
"github.com/swaggo/gin-swagger/swaggerFiles"
|
||||
_ "gitlink.org.cn/Gitlink/account-server/docs"
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
"gitlink.org.cn/Gitlink/account-server/internal/controller/api"
|
||||
"gitlink.org.cn/Gitlink/account-server/internal/middleware"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -9,8 +9,8 @@ package service
|
|||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
"gitlink.org.cn/Gitlink/account-server/internal/dao"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/internal/dao"
|
||||
)
|
||||
|
||||
type Service struct {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"gitlink.org.cn/Gitlink/account-server/internal/model"
|
||||
"gitlink.org.cn/Gitlink/account-server/pkg/app"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/internal/model"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/pkg/app"
|
||||
)
|
||||
|
||||
type UserRegisterRequest struct {
|
||||
|
|
6
main.go
6
main.go
|
@ -3,10 +3,10 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/initialize"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/migrations"
|
||||
"github.com/viletyy/yolk/convert"
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
"gitlink.org.cn/Gitlink/account-server/initialize"
|
||||
"gitlink.org.cn/Gitlink/account-server/migrations"
|
||||
)
|
||||
|
||||
// @title AccountServer Api
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package migrations
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"gitlink.org.cn/Gitlink/account-server/internal/model"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/internal/model"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
package app
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/pkg/errcode"
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
"gitlink.org.cn/Gitlink/account-server/pkg/errcode"
|
||||
)
|
||||
|
||||
type Response struct {
|
||||
|
|
|
@ -10,9 +10,9 @@ import (
|
|||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"github.com/golang-jwt/jwt"
|
||||
"github.com/viletyy/yolk/crypt"
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
)
|
||||
|
||||
type Claims struct {
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
package app
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/viletyy/yolk/convert"
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
)
|
||||
|
||||
func GetPageInfo(c *gin.Context) (page, pageSize int) {
|
||||
|
|
|
@ -9,7 +9,7 @@ package rpc
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
pb "gitlink.org.cn/Gitlink/account-server/proto"
|
||||
pb "code.gitlink.org.cn/Gitlink/account-server.git/proto"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
|
|
@ -13,8 +13,8 @@ import (
|
|||
"path"
|
||||
"time"
|
||||
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
zaprotatelogs "github.com/lestrrat-go/file-rotatelogs"
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
"go.uber.org/zap/zapcore"
|
||||
)
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
"path"
|
||||
"time"
|
||||
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/global"
|
||||
zaprotatelogs "github.com/lestrrat-go/file-rotatelogs"
|
||||
"gitlink.org.cn/Gitlink/account-server/global"
|
||||
"go.uber.org/zap/zapcore"
|
||||
)
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
|||
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
option go_package= "gitlink.org.cn/Gitlink/account-server/proto";
|
||||
option go_package= "code.gitlink.org.cn/Gitlink/account-server.git/proto";
|
||||
|
||||
message Pager {
|
||||
int64 page = 1;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
syntax = "proto3";
|
||||
|
||||
option go_package= "gitlink.org.cn/Gitlink/account-server/proto";
|
||||
option go_package= "code.gitlink.org.cn/Gitlink/account-server.git/proto";
|
||||
|
||||
import "proto/common.proto";
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@ import (
|
|||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"gitlink.org.cn/Gitlink/account-server/internal/service"
|
||||
"gitlink.org.cn/Gitlink/account-server/pkg/app"
|
||||
"gitlink.org.cn/Gitlink/account-server/pkg/errcode/rpc"
|
||||
pb "gitlink.org.cn/Gitlink/account-server/proto"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/internal/service"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/pkg/app"
|
||||
"code.gitlink.org.cn/Gitlink/account-server.git/pkg/errcode/rpc"
|
||||
pb "code.gitlink.org.cn/Gitlink/account-server.git/proto"
|
||||
)
|
||||
|
||||
type UserServer struct {
|
||||
|
|
Loading…
Reference in New Issue