global

package
v2.0.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Log is the general application logger
	Log *logrus.Logger
	// LogInternal is the application logger used to log fatal errors
	LogInternal *logrus.Logger
	// TokenSignKey is the JWT token signing key
	TokenSignKey []byte
	// Decoder is the form<>struct gorilla decoder
	Decoder *schema.Decoder
	// ProxyPath is the application proxy path if behind a proxy
	// "/"" by default
	ProxyPath string
	// ProxyURL is application base url
	// "http://localhost:8081" by default
	ProxyURL string
	// ApplicationFullURL is application full url
	// "http://localhost:8081" by default
	// "ProxyURL + ProxyPath" if behind a proxy
	ApplicationFullURL string
	// MailServerAddress is the SMTP server address
	// such as smtp.univ.fr
	MailServerAddress string
	// MailServerSender is the username used
	// to send mails
	MailServerSender string
	// MailServerPort is the SMTP server port
	MailServerPort string
	// MailServerUseTLS specify if a TLS SMTP connection
	// should be used
	MailServerUseTLS bool
	// MailServerTLSSkipVerify bypass the SMTP TLS verification
	MailServerTLSSkipVerify bool
	// Bundle is the i18n configuration bundle
	Bundle *i18n.Bundle
	// Localizer is the i18n translator
	Localizer *i18n.Localizer
	// BuildID is a compile time variable
	BuildID string
)

Functions

func ConvertSQLNullBool

func ConvertSQLNullBool(value string) reflect.Value

ConvertSQLNullBool converts a string into a NullBool

func ConvertSQLNullFloat64

func ConvertSQLNullFloat64(value string) reflect.Value

ConvertSQLNullFloat64 converts a string into a NullFloat64

func ConvertSQLNullInt64

func ConvertSQLNullInt64(value string) reflect.Value

ConvertSQLNullInt64 converts a string into a NullInt64

func ConvertSQLNullString

func ConvertSQLNullString(value string) reflect.Value

ConvertSQLNullString converts a string into a NullString

func GenSymmetricKey

func GenSymmetricKey(bits int) (k []byte, err error)

GenSymmetricKey generates a key for the JWT encryption https://github.com/northbright/Notes/blob/master/jwt/generate_hmac_secret_key_for_jwt.md

func SchemaRegisterSQLNulls

func SchemaRegisterSQLNulls(d *schema.Decoder)

SchemaRegisterSQLNulls registers the custom null type to the application

Types

type ChimithequeContextKey

type ChimithequeContextKey string

ChimithequeContextKey is the Go request context used in each request

type NullTime

type NullTime struct {
	Time  time.Time
	Valid bool // Valid is true if Time is not NULL
}

NullTime represent a nullable time

func (*NullTime) Scan

func (nt *NullTime) Scan(value interface{}) error

Scan implements the Scanner interface.

func (*NullTime) UnmarshalText

func (nt *NullTime) UnmarshalText(text []byte) (err error)

UnmarshalText parse the string date from the view

func (NullTime) Value

func (nt NullTime) Value() (driver.Value, error)

Value implements the driver Valuer interface.

Jump to

Keyboard shortcuts

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