Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthMiddleware ¶
type AuthMiddleware struct {
Config AuthConfig
// contains filtered or unexported fields
}
func NewAuthMiddleware ¶
func (*AuthMiddleware) ServeHTTP ¶
func (s *AuthMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request)
type CloudSQLConfig ¶
type DecryptedToken ¶
type DecryptedToken struct {
Claims jwt.Claims
Session UserSession
}
type Gogae ¶
type Gogae struct {
Router *httprouter.Router
Auth *AuthMiddleware
Db *sql.DB
Log *logrus.Logger
}
func (Gogae) Handle ¶
func (g Gogae) Handle(f Handler) func(w http.ResponseWriter, r *http.Request, params httprouter.Params)
type GogaeConfig ¶
type GogaeConfig struct {
AuthConfig AuthConfig
CloudSQLConfig *CloudSQLConfig
}
type Handler ¶
type Handler func(context RequestContext) (interface{}, int, error)
type RequestContext ¶
type RequestContext struct {
Request *http.Request
Params httprouter.Params
JWTToken *DecryptedToken
UserDataJson string
Client *http.Client
Log *logrus.Entry
// contains filtered or unexported fields
}
type UserSession ¶
type UserSession struct {
Token *oauth2.Token
UserData string
AuthMiddleware *AuthMiddleware
}
Click to show internal directories.
Click to hide internal directories.