upgrading libs
Этот коммит содержится в:
@@ -9,15 +9,14 @@ import (
|
|||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/mattermost/platform/store"
|
"github.com/mattermost/platform/store"
|
||||||
"github.com/mattermost/platform/utils"
|
"github.com/mattermost/platform/utils"
|
||||||
"github.com/throttled/throttled"
|
"gopkg.in/throttled/throttled.v1"
|
||||||
throttledStore "github.com/throttled/throttled/store"
|
throttledStore "gopkg.in/throttled/throttled.v1/store"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Server struct {
|
type Server struct {
|
||||||
Server *manners.GracefulServer
|
|
||||||
Store store.Store
|
Store store.Store
|
||||||
Router *mux.Router
|
Router *mux.Router
|
||||||
}
|
}
|
||||||
@@ -29,7 +28,6 @@ func NewServer() {
|
|||||||
l4g.Info("Server is initializing...")
|
l4g.Info("Server is initializing...")
|
||||||
|
|
||||||
Srv = &Server{}
|
Srv = &Server{}
|
||||||
Srv.Server = manners.NewServer()
|
|
||||||
Srv.Store = store.NewSqlStore()
|
Srv.Store = store.NewSqlStore()
|
||||||
|
|
||||||
Srv.Router = mux.NewRouter()
|
Srv.Router = mux.NewRouter()
|
||||||
@@ -71,7 +69,7 @@ func StartServer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
err := Srv.Server.ListenAndServe(utils.Cfg.ServiceSettings.ListenAddress, handler)
|
err := manners.ListenAndServe(utils.Cfg.ServiceSettings.ListenAddress, handler)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
l4g.Critical("Error starting server, err:%v", err)
|
l4g.Critical("Error starting server, err:%v", err)
|
||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second)
|
||||||
@@ -84,7 +82,7 @@ func StopServer() {
|
|||||||
|
|
||||||
l4g.Info("Stopping Server...")
|
l4g.Info("Stopping Server...")
|
||||||
|
|
||||||
Srv.Server.Shutdown <- true
|
manners.Close()
|
||||||
Srv.Store.Close()
|
Srv.Store.Close()
|
||||||
hub.Stop()
|
hub.Stop()
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.google.com/p/go.crypto/bcrypt"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"golang.org/x/crypto/bcrypt"
|
||||||
"io"
|
"io"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ package model
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"code.google.com/p/go-uuid/uuid"
|
|
||||||
"encoding/base32"
|
"encoding/base32"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/pborman/uuid"
|
||||||
"io"
|
"io"
|
||||||
"net/mail"
|
"net/mail"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user