From f6c7a85ca04b9285677227d66205856c31a7d364 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Thu, 2 Oct 2025 18:53:56 +0200 Subject: feat(backend): config header links --- backend/config.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'backend/config.go') diff --git a/backend/config.go b/backend/config.go index 15cc585..5e6620b 100644 --- a/backend/config.go +++ b/backend/config.go @@ -8,16 +8,32 @@ import ( "github.com/pelletier/go-toml/v2" ) +type Link struct { + Name string `toml:"name"` + URL string `toml:"url"` +} + type Config struct { Domain string `toml:"domain"` Name string `toml:"name"` Description string `toml:"description"` + Links []Link `toml:"links"` } func (c *Config) DefaultValues() { c.Domain = "example.org" c.Name = "example" c.Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim aeque doleamus animo, cum corpore dolemus, fieri tamen permagna accessio potest, si aliquod aeternum et infinitum impendere malum nobis opinemur. Quod idem licet transferre in voluptatem, ut." + c.Links = []Link{ + { + Name: "Home", + URL: "/", + }, + { + Name: "Logs", + URL: "/log/", + }, + } } func LoadConfig(path string) (*Config, bool) { -- cgit v1.2.3