Add google authentication

This commit is contained in:
Achim Rohn
2025-07-27 18:25:39 +02:00
parent 728cf90236
commit d6a229c95f
9 changed files with 953 additions and 0 deletions
+36
View File
@@ -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
}