Commit Graph

16 Commits

Author SHA1 Message Date
饺子w (Yumechi) 496c166981
chore: Migrate github.com/jinzhu/gorm to gorm.io/gorm (#863)
* chore: Migrate github.com/jinzhu/gorm to gorm.io/gorm

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* chore: drop singleton connection limit on sqlite3 backend

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* enhance: database logging

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* Revert "chore: drop singleton connection limit on sqlite3 backend"

This reverts commit b494a3bd1f2e18dc9b5e57bbb87e755a6247452f.

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* typo

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* rename unique_index -> uniqueIndex

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* drop uniqueIndex on primary key

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* migrate fully to new gorm tag format

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* specify unique index name

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* remove pluginConf duplicate index

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* disable auto migrate FK

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

---------

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2025-10-29 22:23:10 +00:00
饺子w (Yumechi) 9262a24abc
feat: refine AutoCert logic (#843)
* feat: refine AutoCert logic

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* add a configurable name to the roundtripper

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2025-09-19 04:43:09 -05:00
饺子w (Yumechi) c81a9a2c88
Set umask=0 when creating unix sockets (#743)
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2024-11-22 18:03:58 +00:00
Jannis Mattheis 6b3ff77651 fix: panic when setting bool via envvar
$ docker run -e GOTIFY_SERVER_SSL_ENABLED=true --rm gotify/server:2.6.0
    Starting Gotify version 2.6.0@2024-11-15-19:19:19
    panic: reflect.Set: value of type bool is not assignable to type *bool

    goroutine 1 [running]:
    reflect.Value.assignTo({0xf5e000?, 0x1c375a8?, 0x19?}, {0x108809b, 0xb}, 0xf42960, 0x0)
            /usr/local/go/src/reflect/value.go:3358 +0x299
    reflect.Value.Set({0xf42960?, 0xc0000cd200?, 0x4?}, {0xf5e000?, 0x1c375a8?, 0xf42960?})
            /usr/local/go/src/reflect/value.go:2313 +0xe6
    github.com/jinzhu/configor.(*Configor).processTags(0xc0002f0270, {0xc0002eecc0?, 0xc0000cd200?}, {0xc0002ef0c0, 0x3, 0x4})
            /go/pkg/mod/github.com/jinzhu/configor@v1.2.2/utils.go:307 +0xc11
    github.com/jinzhu/configor.(*Configor).processTags(0xc0002f0270, {0xc0002eec80?, 0xc0000cd1e0?}, {0xc0002ad880, 0x2, 0x2})
            /go/pkg/mod/github.com/jinzhu/configor@v1.2.2/utils.go:330 +0xe79
    github.com/jinzhu/configor.(*Configor).processTags(0xc0002f0270, {0xf41420?, 0xc0000cd1e0?}, {0xc0002f0610, 0x1, 0x1})
            /go/pkg/mod/github.com/jinzhu/configor@v1.2.2/utils.go:330 +0xe79
    github.com/jinzhu/configor.(*Configor).load(0xc0002f0270, {0xf41420, 0xc0000cd1e0}, 0x0, {0xc0002ad7a0?, 0x1c7c000?, 0xc0002ad7a0?})
            /go/pkg/mod/github.com/jinzhu/configor@v1.2.2/utils.go:415 +0x3f8
    github.com/jinzhu/configor.(*Configor).Load(0xc0002f0270, {0xf41420, 0xc0000cd1e0}, {0xc0002ad7a0, 0x2, 0x2})
            /go/pkg/mod/github.com/jinzhu/configor@v1.2.2/configor.go:92 +0x13c
    github.com/gotify/server/v2/config.Get()
            /src/gotify/config/config.go:69 +0xf3
    main.main()
            /src/gotify/app.go:34 +0x1e5
2024-11-15 22:53:41 +01:00
Laurence d0b3271880 feat: listen on unix sockets
With this you can configure a unix socket in server.listenaddr and
server.ssl.listenaddr by prefixing the socket path with unix:

Co-authored-by: Jannis Mattheis <contact@jmattheis.de>
2024-01-20 10:17:51 +01:00
Jannis Mattheis 615aa5ce1c Fix redirect to https with default http port
Fixes #528
2022-12-03 11:42:19 +01:00
Jannis Mattheis 3454dcd602 Use golangci-lint 2020-11-01 10:47:02 +01:00
Jannis Mattheis 909eeff406 Make keepalive period configurable 2020-09-10 16:22:04 +00:00
Jannis Mattheis 7b90b8a8f5 Use v2 in package path 2020-05-08 10:43:17 +02:00
饺子w d82a78b8aa Listen on custom address (#140)
Co-Authored-By: eternal-flame-AD <ef@eternalflame.info>
2019-03-08 09:40:26 +01:00
Jannis Mattheis 68b160997d Format all go files 2019-01-01 23:34:42 +01:00
Jannis Mattheis 44b46dac55 Remove unnecessary println 2018-03-31 18:44:49 +02:00
Jannis Mattheis 6b537c956b Move https server in go func to not block http server 2018-03-18 17:29:15 +01:00
Jannis Mattheis a60c2f2d2f Add some logging & version info building 2018-02-21 19:27:31 +01:00
Jannis Mattheis a413b3d182 Log errors 2018-02-19 17:40:05 +01:00
Jannis Mattheis 80887bf4b5 Add support for ssl. 2018-02-19 17:40:05 +01:00