models

package
v0.0.0-...-5a62e24 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2017 License: GPL-3.0 Imports: 2 Imported by: 4

Documentation

Overview

Package models exports application-wide used structs.

Index

Constants

View Source
const CategoryFreitagssitzung string = "Freitagsrundensitzung"

Category denotes the type of a protocol item. For example, being from one of the Freitagsrunde's internal meetings.

View Source
const StatusInReview string = "In Review"

Status represents the phase an uploaded protocol is currently in. From 'in review' to 'published'.

View Source
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

func (c *Config) GetDBConn() *gorm.DB

GetDBConn returns the active connection of protokollamt to configured database.

func (*Config) GetJWTSigningSecret

func (c *Config) GetJWTSigningSecret() string

GetJWTSignSecret returns the randomly generated JWT signing secret.

func (*Config) GetJWTValidFor

func (c *Config) GetJWTValidFor() time.Duration

GetJWTSignSecret returns the randomly generated JWT signing secret.

func (*Config) GetLDAPBindDN

func (c *Config) GetLDAPBindDN() string

GetBindDN is a receiver to retrieve defined part of request dinstinguished name, BindDN.

func (*Config) GetLDAPServerName

func (c *Config) GetLDAPServerName() string

GetServerName is a receiver to retrieve the LDAP service's server name for connecting with TLS.

func (*Config) GetLDAPServiceAddr

func (c *Config) GetLDAPServiceAddr() string

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 JWT

type JWT struct {
	SigningSecret string `toml:"-"`
	ValidFor      int
}

JWT contains configuration values for use of JSON Web Tokens.

type LDAP

type LDAP struct {
	ServiceAddr string
	ServerName  string
	BindDN      string
}

LDAP holds configuration for authorizing users by means of a LDAP infrastructure.

type Mail

type Mail struct {
	ServiceAddr string
	User        string
	Password    string `toml:"-"`
}

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.

type Removal

type Removal struct {
	ID       string    `gorm:"primary_key"`
	Created  time.Time `gorm:"not null"`
	StartTag string    `gorm:"not null"`
	EndTag   string    `gorm:"not null"`
}

Removal represents an element in the removal part of the protocol analysis pipeline.

type Replacement

type Replacement struct {
	ID            string    `gorm:"primary_key"`
	Created       time.Time `gorm:"not null"`
	SearchString  string    `gorm:"not null"`
	ReplaceString string    `gorm:"not null"`
}

Replacement represents an element in the replacement part of the protocol analysis pipeline.

Jump to

Keyboard shortcuts

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