mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2025-09-10 12:14:28 +00:00
go fmt and golint
This commit is contained in:
@ -11,6 +11,7 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
// Auth interface to implement as auth provider
|
||||
type Auth interface {
|
||||
Setup() error
|
||||
CodeUrl(state string) string
|
||||
@ -18,6 +19,7 @@ type Auth interface {
|
||||
UserInfo(oauth2Token *oauth2.Token) (*model.User, error)
|
||||
}
|
||||
|
||||
// GetAuthProvider get an instance of auth provider based on config
|
||||
func GetAuthProvider() (Auth, error) {
|
||||
var oauth2Client Auth
|
||||
var err error
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Fake in order to implement interface, struct is required
|
||||
type Fake struct{}
|
||||
|
||||
// Setup validate provider
|
||||
|
@ -13,6 +13,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Github in order to implement interface, struct is required
|
||||
type Github struct{}
|
||||
|
||||
var (
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
// Oauth2idc in order to implement interface, struct is required
|
||||
type Oauth2idc struct{}
|
||||
|
||||
var (
|
||||
|
Reference in New Issue
Block a user