Documentation ¶
Index ¶
- Variables
- func AddKey(c *gin.Context)
- func AddOrm(c *gin.Context)
- func Api(data *Apis)
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetNames() []string
- func BackUP(c *gin.Context)
- func BatchKey(c *gin.Context)
- func Cors() gin.HandlerFunc
- func CreateBucket(c *gin.Context)
- func DeleteBucket(c *gin.Context)
- func DeleteKey(c *gin.Context)
- func GetAllKey(c *gin.Context)
- func GetBucket(c *gin.Context)
- func GetKey(c *gin.Context)
- func GetOrmAllData(c *gin.Context)
- func GetOrmRangeData(c *gin.Context)
- func GetPreifxKey(c *gin.Context)
- func GetRangeKey(c *gin.Context)
- func Home() (string, error)
- func NewBolt() *storm.DB
- func RegisterAPI(router *gin.Engine)
- func RegisterOrmAPI(router *gin.Engine)
- type Apis
- type Lflxp
- type Result
- type TimeSeries
Constants ¶
This section is empty.
Variables ¶
var (
HtmlTemp multitemplate.Render
)
Functions ¶
func AddKey ¶
@Summary 添加Key接口 @Description 添加指定bucket下的key @Tags Key @Param bucket path string true "BUCKET" @Param key path string true "KEY" @Param value path string true "VALUE" @Success 200 {string} string "success" @Router /api/v1/key/add/{bucket}/{key}/{value} [post]
func AddOrm ¶
@Summary 新增TimeSeries接口 @Description TimeSeries Add @Tags TimeSeries @Param data body TimeSeries true "NAME" @Success 200 {object} TimeSeries TimeSeries{} //成功返回的数据结构, 最后是示例 @Router /api/v1/orm/add [post]
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func BackUP ¶
@Summary BackUP数据库备份 @Description curl http://localhost/api/v1/db/backup > my.db @Tags DB @Success 200 {string} string "success" //成功返回的数据结构, 最后是示例 @Router /api/v1/db/backup [get]
func BatchKey ¶
@Summary 批量添加Key接口 @Description 批量添加指定bucket下的key @Tags Key @Param bucket path string true "BUCKET" @Param key path string true "KEY" @Param value path string true "VALUE" @Success 200 {string} string "success" @Router /api/v1/key/batch/{bucket}/{key}/{value} [post]
func CreateBucket ¶
@Summary 新增Bucket接口 @Description Bucket Add @Tags Bucket @Param name path string true "NAME" @Success 200 {string} string "success" //成功返回的数据结构, 最后是示例 @Router /api/v1/bucket/add/{name} [post]
func DeleteBucket ¶
@Summary 删除Bucket接口 @Description DELETE Bucket @Tags Bucket @Param name path string true "NAME" @Success 200 {string} string "success" @Router /api/v1/bucket/delete/{name} [delete]
func DeleteKey ¶
@Summary 删除Key接口 @Description 删除指定bucket下的key @Tags Key @Param bucket path string true "BUCKET" @Param key path string true "KEY" @Success 200 {string} string "success" @Router /api/v1/key/delete/{bucket}/{key} [delete]
func GetAllKey ¶
@Summary 查询Bucket All Key接口 @Description 查询指定bucket下所有key @Tags Key @Param bucket path string true "BUCKET" @Success 200 {string} string "success" @Router /api/v1/key/get/{bucket} [get]
func GetBucket ¶
@Summary 查询Bucket接口 @Description Bucket GET @Tags Bucket @Success 200 {string} string "success" //成功返回的数据结构, 最后是示例 @Router /api/v1/bucket/get [get]
func GetKey ¶
@Summary 查询Key接口 @Description 查询指定bucket下的key @Tags Key @Param bucket path string true "BUCKET" @Param key path string true "KEY" @Success 200 {string} string "success" @Router /api/v1/key/get/{bucket}/{key} [get]
func GetOrmAllData ¶
@Summary 查询TimeSeries接口 @Description TimeSeries GET @Tags TimeSeries @Success 200 {string} string "success" //成功返回的数据结构, 最后是示例 @Router /api/v1/orm/getall [get]
func GetOrmRangeData ¶
@Summary 查询TimeSeries接口 @Description TimeSeries Range范围查询 @Tags TimeSeries @Param min path string true "MIN" @Param max path string true "MAX" @Success 200 {string} string "success" //成功返回的数据结构, 最后是示例 @Router /api/v1/orm/range/{min}/{max} [get]
func GetPreifxKey ¶
@Summary Search Prefix Key接口 @Description 按前缀查询指定bucket数据 @Tags Key @Param bucket path string true "BUCKET" @Param key path string true "KEY" @Success 200 {string} string "success" @Router /api/v1/key/prefix/{bucket}/{key} [get]
func GetRangeKey ¶
@Summary Search Range接口 @Description 范围搜索指定bucket数据 @Tags Key @Param bucket path string true "BUCKET" @Param min path string true "MIN" @Param max path string true "MAX" @Success 200 {string} string "success" @Router /api/v1/key/range/{bucket}/{min}/{max} [get]
func Home ¶
Home returns the home directory for the executing user.
This uses an OS-specific method for discovering the home directory. An error is returned if a home directory cannot be detected.