Documentation
¶
Index ¶
- func GetLoginURL(redirect string, auto bool) string
- func HTTPClient(w http.ResponseWriter, r *http.Request) (*http.Client, error)
- func HandleCallback(w http.ResponseWriter, r *http.Request)
- func HandleChangelog(w http.ResponseWriter, r *http.Request)
- func HandleFindBuild(w http.ResponseWriter, r *http.Request)
- func HandleFindReleasedBuild(w http.ResponseWriter, r *http.Request)
- func HandleFindReleasedBuildGerrit(w http.ResponseWriter, r *http.Request)
- func HandleIndex(w http.ResponseWriter, r *http.Request)
- func HandleLogin(w http.ResponseWriter, r *http.Request)
- func HandleReadme(w http.ResponseWriter, r *http.Request)
- func HandleSignOut(w http.ResponseWriter, r *http.Request)
- func RequireToken(w http.ResponseWriter, r *http.Request, activePage string) bool
- func SignedIn(r *http.Request) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLoginURL ¶
GetLoginURL returns a login URL to redirect the user to
func HTTPClient ¶
HTTPClient creates an authorized HTTP Client using stored token credentials.
func HandleCallback ¶
func HandleCallback(w http.ResponseWriter, r *http.Request)
HandleCallback handles the response from the Oauth callback URL. It verifies response state and populates session with callback values. Redirects to URL stored in the callback state on completion.
func HandleChangelog ¶
func HandleChangelog(w http.ResponseWriter, r *http.Request)
HandleChangelog serves the changelog page
func HandleFindBuild ¶
func HandleFindBuild(w http.ResponseWriter, r *http.Request)
HandleFindBuild serves the Locate CL page
func HandleFindReleasedBuild ¶
func HandleFindReleasedBuild(w http.ResponseWriter, r *http.Request)
HandleFindReleasedBuild serves the Locate CL page
func HandleFindReleasedBuildGerrit ¶
func HandleFindReleasedBuildGerrit(w http.ResponseWriter, r *http.Request)
HandleFindReleasedBuildGerrit returns the released build number in JSON
func HandleIndex ¶
func HandleIndex(w http.ResponseWriter, r *http.Request)
HandleIndex serves the home page
func HandleLogin ¶
func HandleLogin(w http.ResponseWriter, r *http.Request)
HandleLogin initiates the Oauth flow.
func HandleReadme ¶
func HandleReadme(w http.ResponseWriter, r *http.Request)
HandleReadme serves the about page
func HandleSignOut ¶
func HandleSignOut(w http.ResponseWriter, r *http.Request)
HandleSignOut signs out the user by removing token information from the session
func RequireToken ¶
RequireToken will check if the user has a valid, unexpired Oauth token. If not, it will initiate the Oauth flow. Returns a bool indicating if the user was redirected
Types ¶
This section is empty.