system

package
v2.0.0-rc8+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2018 License: GPL-3.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

View Source
const DatePickerLayout string = "01/02/2006"

Variables

This section is empty.

Functions

This section is empty.

Types

type SystemSettings

type SystemSettings struct {
	Id int64

	IsDisplayGlobalMessage        bool
	IsAccessAllowed               bool
	IsRegistrationAllowed         bool
	IsEmailVerification           bool
	IsGlobalMessageExpirationDate bool

	GlobalMessage                   string
	GlobalMessageType               string
	GlobalMessageTimeStamp          string
	GlobalMessageExpirationDate     time.Time
	GlobalMessageExpirationDateUnix string

	ImprintMessage string
	PrivacyMessage string
}

The SystemSettings are an automated XORM-struct. This means any changes you make to the struct will be automatically applied to the table in the database. It also stores multiple fields of date information, which are explained as follows:

DATE FIELDS ---------------------------------------------------------------------------------| GlobalMessageType:

Saves an css class, which is inserted into the navbar in the template.

GlobalMessageTimeStamp:

Saves the date a message was last set to display. This is used so when a new message is set,
users will see it again (If they had clicked away the previous message).

GlobalMessageExpirationDate:

Saves the date a message is going to expire on as a go-time field. We use this to verify
the user-input date is valid

GlobalMessageExpirationDateUnix:

Saves the date a message is going to expire as a Unix int. This just means we don't
have to calculate it frontend everytime we wan't to check the date.

---------------------------------------------------------------------------------------------|

func (*SystemSettings) GetExpirationDateForDatePicker

func (systemSettings *SystemSettings) GetExpirationDateForDatePicker() string

Jump to

Keyboard shortcuts

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