Create & Init Project...

This commit is contained in:
2019-04-22 18:49:16 +08:00
commit fc4fa37393
25440 changed files with 4054998 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = ["tree.go"],
importpath = "go-common/app/admin/main/apm/model/tree",
tags = ["automanaged"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

View File

@@ -0,0 +1,65 @@
package tree
import "time"
// Token token
type Token struct {
Token string `json:"token"`
UserName string `json:"user_name"`
Secret string `json:"secret"`
Expired int64 `json:"expired"`
}
// TokenResult token result
type TokenResult struct {
Code int `json:"code"`
Data *Token `json:"data"`
Message string `json:"message"`
Status int `json:"status"`
}
// Resp tree resp
type Resp struct {
Data []*Node `json:"data"`
}
// Node node
type Node struct {
TreeID int `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
Type int `json:"type"`
Role int `json:"role"`
DiscoveryID string `json:"discovery_id"`
}
// Tree tree model
type Tree struct {
Project string `json:"project"`
Subs []*Tree `json:"subs"`
}
// Rest tree rest
type Rest struct {
Data []*Info `json:"data"`
}
// Info tree info
type Info struct {
AppTreeID int `json:"app_tree_id"`
AppID string `json:"app_id"`
}
// Resd tree resd
type Resd struct {
Data []*DiscoveryID `json:"data"`
CTime time.Time `json:"ctime"`
}
// DiscoveryID node
type DiscoveryID struct {
TreeID int `json:"app_tree_id"`
AppID string `json:"app_id"`
AppAuth string `json:"app_auth"`
DiscoveryID string `json:"discovery_id"`
}