diff options
author | hanemile <mail@emile.space> | 2020-07-19 01:56:09 +0200 |
---|---|---|
committer | hanemile <mail@emile.space> | 2020-07-19 01:56:09 +0200 |
commit | fc63adf55849f748a37cef4c425a19a1c0f0e76e (patch) | |
tree | 034c6ab3abb08fe15c702298f294226f1b0071c2 /src/structs |
initial commit
Diffstat (limited to 'src/structs')
-rw-r--r-- | src/structs/config.go | 12 | ||||
-rw-r--r-- | src/structs/go.mod | 5 | ||||
-rw-r--r-- | src/structs/go.sum | 2 | ||||
-rw-r--r-- | src/structs/talk.go | 26 |
4 files changed, 45 insertions, 0 deletions
diff --git a/src/structs/config.go b/src/structs/config.go new file mode 100644 index 0000000..ce70c4c --- /dev/null +++ b/src/structs/config.go @@ -0,0 +1,12 @@ +package structs + +// Configuration bundles the indivudial configurations +type Configuration struct { + HTTP HTTPConfig +} + +// HTTPConfig defines an HTTP config +type HTTPConfig struct { + BindIP string + Port int +} diff --git a/src/structs/go.mod b/src/structs/go.mod new file mode 100644 index 0000000..f7ef1fb --- /dev/null +++ b/src/structs/go.mod @@ -0,0 +1,5 @@ +module git.darknebu.la/chaosdorf/freitagsfoo/src/structs + +go 1.13 + +require github.com/google/uuid v1.1.1 diff --git a/src/structs/go.sum b/src/structs/go.sum new file mode 100644 index 0000000..b864886 --- /dev/null +++ b/src/structs/go.sum @@ -0,0 +1,2 @@ +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= diff --git a/src/structs/talk.go b/src/structs/talk.go new file mode 100644 index 0000000..ec502c6 --- /dev/null +++ b/src/structs/talk.go @@ -0,0 +1,26 @@ +package structs + +import ( + "time" + + "github.com/google/uuid" +) + +// Talk defines a talk +type Talk struct { + // Meta + UUID uuid.UUID `pg:"type:uuid"` + ID int `pg:",pk"` + + // Actual Talk information + Title string + Description string + Slides string + Nickname string + + Date time.Time // the actual date entered + FormattedDate string // the date formatted in a way that can be displayed nicely + + // Organization + Upcoming bool `pg:",use_zero"` +} |