Add google authentication
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package google
|
||||
|
||||
// AUTO GENERATED
|
||||
// DO NOT EDIT
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"golang.org/x/oauth2"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Credentials struct {
|
||||
Token oauth2.Token `json:"token"`
|
||||
}
|
||||
|
||||
type GoogleAuth struct {
|
||||
Id int `db:"id"`
|
||||
Credentials Credentials `db:"credentials"`
|
||||
UserId int `db:"user_id"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at"`
|
||||
}
|
||||
|
||||
func (s GoogleAuth) String() string {
|
||||
return fmt.Sprint("GoogleAuth{ ",
|
||||
"Id: ", s.Id, ", ",
|
||||
"Credentials: ", s.Credentials, ", ",
|
||||
"UserId: ", s.UserId, ", ",
|
||||
"CreatedAt: ", s.CreatedAt, ", ",
|
||||
"UpdatedAt: ", s.UpdatedAt, ", ",
|
||||
"}")
|
||||
}
|
||||
|
||||
func (s GoogleAuth) GetId() int {
|
||||
return s.Id
|
||||
}
|
||||
Reference in New Issue
Block a user