This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func cond(expr bool, yes interface{}, no interface{}) interface{} { | |
if expr { | |
return yes | |
} else { | |
return no | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Auth0Token struct { | |
Iss string `json:"iss"` | |
Sub string `json:"sub"` | |
Aud string `json:"aud"` | |
Exp int `json:"exp"` | |
Iat int `json:"iat"` | |
Name string `json:"name"` | |
GivenName string `json:"given_name"` | |
FamilyName string `json:"family_name"` | |
Gender string `json:"gender"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sqlconnection is sequelize, connected properly. | |
class Post extends Model { | |
} | |
Post.init({ | |
name: DataTypes.STRING, | |
description: DataTypes.STRING | |
}, { | |
sequelize: sqlconnection, |