Documentation ¶
Index ¶
- Variables
- func ConfigAssertKeysNonEmpty(config interface{}, keys ...string)
- func DataRoot() string
- func FixBareVersion()
- func GetSession(r *http.Request) *sessions.Session
- func Init(config interface{}, doneURL string, saveOA2Info oauth2.SaveInfoFunc)
- func InitConfig(path string, template interface{})
- func JWTDestroy(w http.ResponseWriter)
- func JWTGetClaims(c *htp.Controller, r *http.Request) jwt.MapClaims
- func JWTSet(w http.ResponseWriter, sub string)
- func PgpEncrypt(c *htp.Controller, message string, keys ...string) string
- func PgpPubKeyFingerprint(c *htp.Controller, keyText string) string
- func PreInit()
- func SetSessionName(name string)
- func StartServer()
- func WriteHandlebarsFile(r *http.Request, w http.ResponseWriter, path string, ...)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AppID string Version = "vMASTER" MFS = new(types.MultiplexFileSystem) Database dbstorage.Database ConfigPath string JWTSecret string Port int Epoch = internal.Epoch HtpErrCb = func(r *http.Request, w http.ResponseWriter, good bool, status int, message string) {} )
globals
Functions ¶
func ConfigAssertKeysNonEmpty ¶
func ConfigAssertKeysNonEmpty(config interface{}, keys ...string)
func FixBareVersion ¶
func FixBareVersion()
FixBareVersion will convert a 'vMASTER' version string to a string similar to 'vMASTER-2020.02.12-6cae79d'. Always append go version.
func Init ¶
func Init(config interface{}, doneURL string, saveOA2Info oauth2.SaveInfoFunc)
Init sets up app-agnostic features
func InitConfig ¶
func InitConfig(path string, template interface{})
func JWTDestroy ¶
func JWTDestroy(w http.ResponseWriter)
JWTDestroy tells the ResponseWriter to delete the 'jwt' cookie
func JWTGetClaims ¶
JWTGetClaims reads the 'jwt' cookie and returns claims within it, if they are valid
func JWTSet ¶
func JWTSet(w http.ResponseWriter, sub string)
JWTSet sets a 'jwt' cookie on the provided ResponseWriter
func PgpEncrypt ¶
func PgpEncrypt(c *htp.Controller, message string, keys ...string) string
func PgpPubKeyFingerprint ¶
func PgpPubKeyFingerprint(c *htp.Controller, keyText string) string
func SetSessionName ¶
func SetSessionName(name string)
func StartServer ¶
func StartServer()
func WriteHandlebarsFile ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.