ajout base de donnees pour param et oauth
This commit is contained in:
15
model/oauth.go
Normal file
15
model/oauth.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package model
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Oauth struct {
|
||||
ID int64 `db:"id"`
|
||||
AccessToken string `db:"access_token"`
|
||||
ExpireIN int `db:"expire_in"`
|
||||
RefreshToken string `db:"refreh_token"`
|
||||
}
|
||||
|
||||
func (o Oauth) String() string {
|
||||
return fmt.Sprintf("id=%v, accessToken=%v, expireIN=%v, refreshToken=%v",
|
||||
o.ID, o.AccessToken, o.ExpireIN, o.RefreshToken)
|
||||
}
|
||||
16
model/param.go
Normal file
16
model/param.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package model
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Param struct {
|
||||
ID int64 `db:"id"`
|
||||
Domaine string `db:"domaine"`
|
||||
ClientID string `db:"client_id"`
|
||||
ClientSecret string `db:"client_secret"`
|
||||
GrantType string `db:"grant_type"`
|
||||
}
|
||||
|
||||
func (p Param) String() string {
|
||||
return fmt.Sprintf("id=%v, title=%v, releaseDate=%v, duration=%v, trailerURL=%v",
|
||||
p.ID, p.Domaine, p.ClientID, p.ClientSecret, p.GrantType)
|
||||
}
|
||||
Reference in New Issue
Block a user