controllers

package
v0.0.0-...-4aaa17f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoginURL

func GetLoginURL(redirect string, auto bool) string

GetLoginURL returns a login URL to redirect the user to

func HTTPClient

func HTTPClient(w http.ResponseWriter, r *http.Request) (*http.Client, error)

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

func RequireToken(w http.ResponseWriter, r *http.Request, activePage string) bool

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

func SignedIn

func SignedIn(r *http.Request) bool

SignedIn returns a bool indicating if the current request is signed in

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL