From 8c50127dd8d764b5773cbaaaee183678bff7f0d4 Mon Sep 17 00:00:00 2001 From: perp Date: Mon, 3 Jun 2024 12:42:58 +0100 Subject: [PATCH] Add authentication config --- cmd/config.toml | 3 +++ internal/config/config.go | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/cmd/config.toml b/cmd/config.toml index 34a05c8..3619633 100644 --- a/cmd/config.toml +++ b/cmd/config.toml @@ -1,3 +1,6 @@ +[auth] +disabled = false + [server] address = "127.0.0.1:8080" read_timeout = 10 diff --git a/internal/config/config.go b/internal/config/config.go index e8f7e98..0fc2f0b 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -16,11 +16,17 @@ package config // Configuration type Config struct { + Auth *Auth Server *Server Database *Database Log *Log } +// Auth configuration +type Auth struct { + Disabled bool `toml:"disabled"` +} + // Server configuration type Server struct { Address string `toml:"address"`