dynamic_config

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(key string) string

Get returns the config value.

func GetAllConfig

func GetAllConfig(c *gin.Context) (int, interface{})

GetAllConfig is the HTTP handler used to return the all the configs.

func GetConfig

func GetConfig(c *gin.Context) (int, interface{})

GetConfig is the HTTP handler used to return the config value of the given key.

func Init

func Init()

func Set

func Set(key string, value string)

Set update the config by insert a new record into database, for we can make a config version control soon. Then refresh the config in struct.

func SetConfig

func SetConfig(c *gin.Context) (int, interface{})

SetConfig is the HTTP handler used to set the config value.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL