session_functions

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockByAccountOwnerShip

func BlockByAccountOwnerShip(c *gin.Context, rowAccount string) (blocked bool)

func BlockByDeveloperModeOff

func BlockByDeveloperModeOff(c *gin.Context) (blocked bool)

func BlockByRoleAccess

func BlockByRoleAccess(c *gin.Context, featureId string) (blocked bool)

func BroadcastLog

func BroadcastLog(id string, data string)

func BroadcastTime

func BroadcastTime(date string, timeString string, t time.Time)

func CheckAccountOwnerShip

func CheckAccountOwnerShip(c *gin.Context, rowAccount string) (blocked bool)

func CheckRoleAccess

func CheckRoleAccess(c *gin.Context, featureId string) (result bool)

func CheckRoleAccessByRole

func CheckRoleAccessByRole(userId string, roleId string, featureId string) (result bool)

func Dump

func Dump(values ...interface{})

func FlushAllLogs

func FlushAllLogs() (err error)

func FlushLog

func FlushLog(deviceId string) (err error)

func GetDataFormat

func GetDataFormat(c *gin.Context) model.DataFormat

func GetPartialRedirect

func GetPartialRedirect(controller string, action string, uriParams map[string]string) string

func GetProtocol

func GetProtocol(c *gin.Context) (schema string)

func GetRedirect

func GetRedirect(controller string, action string, uriParams map[string]string) string

func GetSessionAccount

func GetSessionAccount(c *gin.Context) (account model.Account, err error)

func GetSessionAccountRole

func GetSessionAccountRole(c *gin.Context) (accountRole model.AccountRole, err error)

func GetSessionAuthToken

func GetSessionAuthToken(c *gin.Context) (token string)

func GetSessionDateCreated

func GetSessionDateCreated(c *gin.Context) (created string)

func GetSessionRole

func GetSessionRole(c *gin.Context) (role model.Role, err error)

func GetSessionUser

func GetSessionUser(c *gin.Context) (user model.User, err error)

func Log

func Log(desc string, message string)

func LogHex

func LogHex(uniqueId string, desc string, message string)

func LogWithoutQuotes

func LogWithoutQuotes(uniqueId string, desc string, message string)

Logs out a hex dump and should be the most common thing you want to use in a TCP connection log

func ParseSocketClientStatus

func ParseSocketClientStatus(meta app.WebSocketConnectionMeta) (value socketViews.ClientStatus, ok bool)

func Print

func Print(logInfo string)

func Println

func Println(logInfo string)

func StartTransaction

func StartTransaction(c *gin.Context) (t *model.Transaction, err error)

func StartTransactionWithUser

func StartTransactionWithUser(user model.User) (t *model.Transaction, err error)

func StoreDataFormat

func StoreDataFormat(c *gin.Context, language string, timeZone string, dateFormat string)

func WriteLog

func WriteLog(uniqueId string, message string) (err error)

Types

type RequestContext

type RequestContext func() *gin.Context

func PassContext

func PassContext(c *gin.Context) RequestContext

type ServerResponse

type ServerResponse func(string, string, string, error, string, interface{})

type ServerResponseStruct

type ServerResponseStruct struct {
	CompletedSuccessfully bool
	Context               RequestContext
	Redirect              string
	GlobalMessage         string
	GlobalMessageType     string
	Trace                 error
	TransactionId         string
	ViewModel             interface{}
}

func ServerResponseToStruct

func ServerResponseToStruct(completedSuccessfully bool, context RequestContext, redirect string, globalMessage string, globalMessageType string, trace error, transactionId string, viewModel interface{}) ServerResponseStruct

Jump to

Keyboard shortcuts

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