refactor: reorganize modules and add Linux build tooling
This commit is contained in:
21
module/base/logs/cmd/cli/main.go
Normal file
21
module/base/logs/cmd/cli/main.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"git.apinb.com/bsm-sdk/core/infra"
|
||||
"git.apinb.com/bsm-sdk/core/utils"
|
||||
)
|
||||
|
||||
func main() {
|
||||
endpoint := "http://127.0.0.1:16289/oplogs/v1/log"
|
||||
|
||||
data := make([]*infra.LogItem, 0)
|
||||
data = append(data, &infra.LogItem{OpID: 1, OpName: "test", OpType: "test", Text: "test", Module: "测试模块", Code: "0197640D70D373A2927E03946CC4DC48", Ip: "127.0.0.1", Level: 1})
|
||||
fmt.Println(data)
|
||||
// oplog.New(endpoint, data)
|
||||
jsonBytes, _ := json.Marshal(data)
|
||||
utils.HttpPost(endpoint, nil, jsonBytes)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user