package
0.0.0-20241203155450-2f254e5b2c5f
Repository: https://github.com/wfunc/go.git
Documentation: pkg.go.dev
# Functions
FindVersionObjectH is http handler*
*
* @api {GET} /pub/findVersionObject Find Version Object
* @apiName FindVersionObject
* @apiGroup Object
*
*
* @apiParam {Number} object_id the object id
*
* @apiSuccess (Success) {Number} code the result code, see the common define <a href="#metadata-ReturnCode">ReturnCode</a>
* @apiSuccess (VersionObject) {Object} object the Version Object info
* @apiUse VersionObjectObject
*
* @apiParamExample {Query} Request-Example:
* object_id=100
*
*
* @apiSuccessExample {JSON} Success-Response:
* {
* "code": 0,
* "object": {
* "create_time": 1558586942626,
* "key": "key1",
* "pub": "*",
* "status": 100,
* "tid": 1000,
* "update_time": 1558586942626,
* "value": {
* "xx": 1
* }
* }
* }
*
*/.
No description provided by the author
LoadAnnounceH is http handler will load announce from database*
*
* @api {GET} /usr/loadAnnounce Load Announce
* @apiName LoadAnnounce
* @apiGroup Announce
*
*
* @apiParam {Number} announce_id the announce id
*
* @apiSuccess (Success) {Number} code the result code, see the common define <a href="#metadata-ReturnCode">ReturnCode</a>
* @apiSuccess (Announce) {Object} announce the Announce info
* @apiUse AnnounceObject
*
*
* @apiParamExample {Query} Request-Example:
* keyword=xxx
*
*
* @apiSuccessExample {type} Success-Response:
* {
* "announces": [
* {
* "content": null,
* "create_time": 1635170199985,
* "info": {
* "image": "xxx"
* },
* "marked": 10,
* "status": 100,
* "tid": 1000,
* "title": "abc",
* "type": 100,
* "update_time": 1635170199985
* }
* ],
* "code": 0,
* "total": 1
* }
*
*/.
LoadLatestVersionObjectH is http handler*
*
* @api {GET} /pub/vobject/<key>.json Load Latest Version Object
* @apiName LoadLatestVersionObject
* @apiGroup Object
*
*
* @apiParam {String} key the key, eg: /pub/vobject/xxx.json, see define VersionObjectKey* and VersionObjectApp
*
* @apiSuccess (200) {Number} code the response code, see common define
*
* @apiParamExample {Query} Request-Example:
* /pub/vobject/xxx.json
*
*
* @apiSuccessExample {type} Success-Response:
* {
* "code": 0,
* "xxx": 2
* }
*/.
LoadSysConfigH is http handler will load sys config from database*
*
* @api {GET} /usr/loadSysConfig Load Sys Config
* @apiName LoadSysConfig
* @apiGroup Sys
*
*
* @apiSuccess (200) {Number} code the response code, see common define
* @apiSuccess (200) {Object} config the config object
* @apiSuccess (200) {Object} config.xxx the config value by key xxx
* @apiSuccessExample {type} Success-Response:
* {
* "code": 0,
* "config": {
* "key": "value",
* }
* }
*
*
*/.
No description provided by the author
No description provided by the author
SearchAnnounceH is http handler will load announce from database*
*
* @api {GET} /usr/searchAnnounce Search Announce
* @apiName SearchAnnounce
* @apiGroup Announce
*
*
* @apiUse AnnounceUnifySearcher
*
* @apiSuccess (Success) {Number} code the result code, see the common define <a href="#metadata-ReturnCode">ReturnCode</a>
* @apiSuccess (Announce) {Array} announces the Announce info
* @apiUse AnnounceObject
*
*
* @apiParamExample {Query} Request-Example:
* keyword=xxx
*
*
* @apiSuccessExample {type} Success-Response:
* {
* "announces": [
* {
* "content": null,
* "create_time": 1635170199985,
* "info": {
* "image": "xxx"
* },
* "marked": 10,
* "status": 100,
* "tid": 1000,
* "title": "abc",
* "type": 100,
* "update_time": 1635170199985
* }
* ],
* "code": 0,
* "total": 1
* }
*
*/.
SearchVersionObjectH is http handler*
*
* @api {GET} /pub/searchVersionObject Search Version Object
* @apiName SearchVersionObject
* @apiGroup Object
*
*
* @apiUse VersionObjectUnifySearcher
*
* @apiSuccess (Success) {Number} code the result code, see the common define <a href="#metadata-ReturnCode">ReturnCode</a>
* @apiSuccess (VersionObject) {Array} objects the version object info
* @apiUse VersionObjectObject
*
* @apiParamExample {Query} Request-Example:
* key=123
*
* @apiSuccessExample {type} Success-Response:
* {
* "code": 0,
* "limit": 30,
* "objects": [
* {
* "create_time": 1558586942626,
* "keys": "key1",
* "pub": "*",
* "status": 100,
* "tid": 1000,
* "update_time": 1558586942628,
* "value": {
* "xx": 1
* }
* }
* ],
* "skip": 0,
* "total": 1
* }
*/.
UpdateSysConfigH is http handler will update sys config to database*
*
* @api {POST} /usr/updateSysConfig Update Sys Config
* @apiName UpdateSysConfig
* @apiGroup Sys
*
*
* @apiParam {String} key the config key to update by value, see define by Config*
*
* @apiSuccess (200) {Number} code the response code, see define common
* @apiSuccess (200) {Object} config the config object
* @apiSuccess (200) {Object} config.xxx the config value by key xxx
*
* @apiParamExample {JSON} Request-Example:
* {
* "key": "value",
* }
*
*
* @apiSuccessExample {type} Success-Response:
* {
* "code": 0,
* "config": {
* "key": "value",
* }
* }
*
*
*/.
UpsertAnnounceH is http handler to add announce*
*
* @api {POST} /usr/addAnnounce Add Announce
* @apiName AddAnnounceH
* @apiGroup Announce
*
*
* @apiParam (Announce) {Number} [tid] the announce id to update,required with update
* @apiUse AnnounceUpdate
* @apiSuccess (Success) {Number} code the result code, see the common define <a href="#metadata-ReturnCode">ReturnCode</a>
* @apiSuccess (Announce) {Object} announce the Announce info
* @apiUse AnnounceObject
*
*
* @apiParamExample {JSON} AddAnnounce:
* {
* "type": 100,
* "marked": 10,
* "title": "abc",
* "info": {
* "image": "xxx"
* },
* "content": {
* "html": "\u003ca\u003exxx\u003c/a\u003e"
* }
* }
* @apiParamExample {JSON} UpdateAnnounce:
* {
* "tid": 1,
* "title": "announce title",
* }
* @apiParamExample {JSON} RemoveAnnounce:
* {
* "tid": 1,
* "status": -1
* }
*
*
* @apiSuccessExample {JSON} Success-Response:
* {
* "announce": {
* "create_time": 1635169896607,
* "info": {
* "image": "xxx"
* },
* "marked": 10,
* "status": 100,
* "tid": 1000,
* "title": "abc",
* "type": 100,
* "update_time": 1635169896607
* },
* "code": 0
* }
*
*
*/.
UpsertVersionObjectH is http handler*
*
* @api {POST} /usr/upsertVersionObject Upsert Version Object
* @apiName UpsertVersionObject
* @apiGroup Object
*
*
* @apiParam (VersionObject) {String} key the object key
* @apiUse VersionObjectUpdate
* @apiSuccess (Success) {Number} code the result code, see the common define <a href="#metadata-ReturnCode">ReturnCode</a>
* @apiSuccess (VersionObject) {Object} object the Version Object info
* @apiUse VersionObjectObject
*
* @apiParamExample {JSON} Request-Example:
* {
* "key": "key1",
* "value": {
* "xx": 1
* },
* "pub": "*",
* "status": 100
* }
*
*
* @apiSuccessExample {JSON} Success-Response:
* {
* "code": 0,
* "object": {
* "create_time": 1558586942626,
* "key": "key1",
* "pub": "*",
* "status": 100,
* "tid": 1000,
* "update_time": 1558586942626,
* "value": {
* "xx": 1
* }
* }
* }
*
*/.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author