diff --git a/common/config.go b/common/config.go index 7d68233..8b23b87 100644 --- a/common/config.go +++ b/common/config.go @@ -48,8 +48,22 @@ type Section struct { Settings []Setting `json:"settings" yaml:"settings"` } +// Member is a member of a group, and can either reference a Section or another Group, hence the two fields. +type Member struct { + Group string `json:"group,omitempty", yaml:"group,omitempty"` + Section string `json:"section,omitempty", yaml:"section,omitempty"` +} + +type Group struct { + Group string `json:"group" yaml:"group" example:"messaging_providers"` + Name string `json:"name" yaml:"name" example:"Messaging Providers"` + Description string `json:"description" yaml:"description" example:"Options for setting up messaging providers."` + Members []Member `json:"members" yaml:"members"` +} + type Config struct { Sections []Section `json:"sections" yaml:"sections"` + Groups []Group `json:"groups" yaml:"groups"` } func (c *Config) removeSection(section string) { diff --git a/config/config-base.yaml b/config/config-base.yaml index 9e8d535..c0b6c6f 100644 --- a/config/config-base.yaml +++ b/config/config-base.yaml @@ -1,3 +1,26 @@ +groups: + - group: external_services + name: "Integrations" + description: "Integrations with external services." + members: + - group: email + - group: chatbots + - section: ombi + - section: jellyseerr + - group: email + name: "Email" + description: "Options for sending emails through jfa-go." + members: + - section: email + - section: smtp + - section: mailgun + - group: chatbots + name: "Chat bots" + description: "Options for messaging through chat services." + members: + - section: discord + - section: telegram + - section: matrix sections: - section: updates meta: