pages

package
v4.0.0-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package pages implements functions to display the app's interface, the UI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAdminShow

func CreateAdminShow(w http.ResponseWriter, r *http.Request)

CreateAdminShow loads the page used to create the initial admin user this is done only upon the app running for the first time (since nothing exists in this project's datastore yet)

func Login

func Login(w http.ResponseWriter, r *http.Request)

Login is used to show the login page of the app User is shown a login prompt unless they are already logged in (via data in session). If user is already logged in the user is redirected to the main page of the app. This also checks if the app is being run for the first time in which no users exist. This then instead redirects to the initial setup page.

func Main

func Main(w http.ResponseWriter, r *http.Request)

Main loads the main UI of the app This is the page the user sees once they are logged in and the page most actions are performed on. This page can be linked to with a bunch of extra data in teh url to autofill the charge card form.

If a link to the page has a "customer_id" form value, this will automatically find
the customer's card data and show it in the panel.
If "amount", "invoice", and/or "po" form values are given, these will also automatically
be filled into the charge panel's form.
If "customer_id" is not given, no auto filling will occur of any fields.
"amount" must be in cents.
Card is not automatically charged, user still has to click "charge" button.

func NotFound

func NotFound(w http.ResponseWriter, r *http.Request)

NotFound is run when a user browses to a pages that does not exists

Types

This section is empty.

Jump to

Keyboard shortcuts

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