Documentation ¶
Overview ¶
Package models exports application-wide used structs.
Index ¶
Constants ¶
Category denotes the type of a protocol item. For example, being from one of the Freitagsrunde's internal meetings.
const StatusInReview string = "In Review"
Status represents the phase an uploaded protocol is currently in. From 'in review' to 'published'.
const StatusPublished string = "Veröffentlicht"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { DeployStage string PublicAddr string ListenAddr string Database Database JWT JWT LDAP LDAP Mail Mail }
Config contains all directives necessary to run a protokollamt application.
func (*Config) GetDBConn ¶
GetDBConn returns the active connection of protokollamt to configured database.
func (*Config) GetJWTSigningSecret ¶
GetJWTSignSecret returns the randomly generated JWT signing secret.
func (*Config) GetJWTValidFor ¶
GetJWTSignSecret returns the randomly generated JWT signing secret.
func (*Config) GetLDAPBindDN ¶
GetBindDN is a receiver to retrieve defined part of request dinstinguished name, BindDN.
func (*Config) GetLDAPServerName ¶
GetServerName is a receiver to retrieve the LDAP service's server name for connecting with TLS.
func (*Config) GetLDAPServiceAddr ¶
GetServiceAddr is a receiver to retrieve the config's LDAP service address.
type Database ¶
type Database struct { Conn *gorm.DB `toml:"-"` ConnString string `toml:"-"` ServiceAddr string User string Password string `toml:"-"` DBName string SSLMode string }
Database specifies connection details to the application's database.
type Mail ¶
Mail defines how a connected mail server can be contacted for the purpose of sending protocols.
type Protocol ¶
type Protocol struct { ID string `gorm:"primary_key"` UploadDate time.Time `gorm:"not null"` UploadDateString string `gorm:"-"` MeetingDate time.Time `gorm:"not null"` MeetingDateString string `gorm:"-"` Category string `gorm:"index;not null"` InternalVersion string `gorm:"not null"` PublicVersion string `gorm:"not null"` Status string `gorm:"not null"` }
Protocol represents an internal meeting protocol to be reviewed and subsequently published by use of protokollamt.