Documentation ¶
Overview ¶
Copyright 2017 Elliott Polk. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func Find ¶
func Find(w http.ResponseWriter, r *http.Request)
get is a http.HandleFunc that retrieves the relevant config for the provided 'app' and 'env' query parameters. An empty 'env' parameter is valid as the config.Get will use 'default'. The results are run through json.MarshalIndent prior to writing back to the HTTP reponse.
func Remove ¶
func Remove(w http.ResponseWriter, r *http.Request)
remove is a http.HandleFunc that removes the relevant config for the provided 'app' and 'env' query parameters. An empty 'env' parameter is valid as the config.Remove will use 'default'. If no config exists, no error is returned. If the remove occurs properly, a http.StatusOK (200) is returned automatically upon return.
func Set ¶
func Set(w http.ResponseWriter, r *http.Request)
set is a http.HandleFunc that expects a valid config.Config in the request body. It attempts to save the config to the datastore, overwriting the existing app and environment config if one exists. If the save writes properly, a http.StatusOK (200) with the output of what was stored is returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.