Documentation
¶
Index ¶
- Variables
- func ErrorResponse(err *Error, w http.ResponseWriter)
- func JSONResponse(w http.ResponseWriter, status int, payload interface{})
- type Error
- type Server
- func (s *Server) AuthCallback(w http.ResponseWriter, r *http.Request)
- func (s *Server) AuthRedirect(w http.ResponseWriter, r *http.Request)
- func (s *Server) CreateUser(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetGraphqlSchema() (*graphql.Schema, error)
- func (s *Server) GetOAuth2Config() *oauth2.Config
- func (s *Server) HandleSession(next http.Handler) http.Handler
- func (s *Server) Init() error
- func (s *Server) InitRoutes() error
- func (s *Server) ListenAndServe() error
- func (s *Server) SessionHandler() http.Handler
- func (s *Server) UpdateProfileReputation(user *usersstore.User, sessionID string)
- type UserRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInternalServerError = newError(http.StatusInternalServerError) ErrForbidden = newError(http.StatusForbidden) )
Functions ¶
func ErrorResponse ¶
func ErrorResponse(err *Error, w http.ResponseWriter)
func JSONResponse ¶
func JSONResponse(w http.ResponseWriter, status int, payload interface{})
Types ¶
type Server ¶
type Server struct { *configs.Config SessionManager *session.Manager CookieManager *securecookie.SecureCookie Router *mux.Router CSRFManager *csrf.Manager Store *storemanager.Store }
Server encapsulates the connection objects and configs for the gateway server
func (*Server) AuthCallback ¶
func (s *Server) AuthCallback(w http.ResponseWriter, r *http.Request)
func (*Server) AuthRedirect ¶
func (s *Server) AuthRedirect(w http.ResponseWriter, r *http.Request)
func (*Server) CreateUser ¶
func (s *Server) CreateUser(w http.ResponseWriter, r *http.Request)
func (*Server) GetGraphqlSchema ¶
func (*Server) GetOAuth2Config ¶
func (*Server) HandleSession ¶
HandleSession checks session data
func (*Server) InitRoutes ¶
func (*Server) ListenAndServe ¶
func (*Server) SessionHandler ¶
func (*Server) UpdateProfileReputation ¶
func (s *Server) UpdateProfileReputation(user *usersstore.User, sessionID string)
type UserRequest ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.