Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UsersController ¶
type UsersController interface { // Authenticate is middleware that will gate access to any handlers // down the chain. After Authenticate has been called, and it has // successfuly next, you can access the user object using: // `user := usercontext.FromContext(r.Context())` Authenticate(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) // List returns a list of the top ten users, ranked by // their riches. List(rw http.ResponseWriter, r *http.Request) // Login returns a user object, along with a nested profile. The // id_token should be used as the a "Authorization Bearer" token // for example: `curl -H 'Authorization: Bearer <id_token>' http://...` Login(rw http.ResponseWriter, r *http.Request) // Token returns a user object, along with a nested profile. The // refresh_token should be in the POST body with a grant_type of refresh_token // for example: // “` // curl \ // -H 'Content-Type: application/json' \ // -d '{"grant_type": "refresh_token", "refresh_token": "<token>"}' \ // http://...` // Token(rw http.ResponseWriter, r *http.Request) }
UsersController handles HTTP requests regarding users
func New ¶
func New(service usersservice.UsersService) UsersController
New constructs a new UsersController instance
Click to show internal directories.
Click to hide internal directories.