Documentation ¶
Overview ¶
Package setting manages both global and user level settings
Package setting manages both global and user level settings ¶
Package setting manages both global and user level settings
Index ¶
- func GetSMTPConfig(s *store.Store) (c smtp.Config)
- type Handler
- func (h *Handler) AuthConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetGlobalSetting(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetInstanceSetting(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SMTP(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SaveGlobalSetting(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SaveInstanceSetting(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SetAuthConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SetSMTP(w http.ResponseWriter, r *http.Request)
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
Handler contains the runtime information such as logging and database.
func (*Handler) AuthConfig ¶
func (h *Handler) AuthConfig(w http.ResponseWriter, r *http.Request)
AuthConfig returns installation-wide auth configuration
func (*Handler) GetGlobalSetting ¶ added in v1.71.0
func (h *Handler) GetGlobalSetting(w http.ResponseWriter, r *http.Request)
GetGlobalSetting returns the requested organization level setting.
func (*Handler) GetInstanceSetting ¶ added in v1.71.0
func (h *Handler) GetInstanceSetting(w http.ResponseWriter, r *http.Request)
GetInstanceSetting returns the requested organization level setting.
func (*Handler) SMTP ¶
func (h *Handler) SMTP(w http.ResponseWriter, r *http.Request)
SMTP returns installation-wide SMTP settings
func (*Handler) SaveGlobalSetting ¶ added in v1.71.0
func (h *Handler) SaveGlobalSetting(w http.ResponseWriter, r *http.Request)
SaveGlobalSetting saves org level setting.
func (*Handler) SaveInstanceSetting ¶ added in v1.71.0
func (h *Handler) SaveInstanceSetting(w http.ResponseWriter, r *http.Request)
SaveInstanceSetting saves org level setting.
func (*Handler) SetAuthConfig ¶
func (h *Handler) SetAuthConfig(w http.ResponseWriter, r *http.Request)
SetAuthConfig persists installation-wide authentication configuration
type Store ¶ added in v1.71.0
type Store struct { store.Context store.SettingStorer }
Store provides data access to user permission information.
func (Store) GetUser ¶ added in v1.71.0
GetUser fetches a configuration JSON element from the userconfig table for a given orgid/userid combination. Errors return the empty string. A blank path returns the whole JSON object, as JSON. You can store org level settings by providing an empty user ID.