Procházet zdrojové kódy

调用mcp-测试通过-搜索店铺档案表

qdy před 1 měsícem
rodič
revize
7142934066

binární
.DS_Store Zobrazit soubor


+ 44
- 0
internal/tables/config_project.go Zobrazit soubor

@@ -0,0 +1,44 @@
1
+package tables
2
+
3
+import (
4
+	"time"
5
+
6
+	"git.x2erp.com/qdy/go-db/sqldef"
7
+)
8
+
9
+func init() {
10
+	sqldef.AddRegistration(func(r *sqldef.Registry) {
11
+		tb := sqldef.NewTable("config_project", "配置项目表").
12
+			ID("id", 128).NotNull().Comment("主键").End().
13
+			String("project_id", 128).NotNull().Comment("项目ID").End().
14
+			String("description", 256).NotNull().Default("''").Comment("项目描述").End().
15
+			String("mcp_url", 256).NotNull().Default("''").Comment("MCP服务地址").End().
16
+			String("creator", 32).NotNull().Comment("创建人").End().
17
+			DateTime("created_at").NotNull().Default("CURRENT_TIMESTAMP").Comment("创建时间").End()
18
+
19
+		tb.AddIndex("idx_project_id", "project_id")
20
+
21
+		r.RegisterTable(tb.Build())
22
+	})
23
+}
24
+
25
+type Project struct {
26
+	ProjectID   string    `gorm:"column:project_id;type:varchar(128);not null;primaryKey;comment:项目ID"`
27
+	Description string    `gorm:"column:description;type:varchar(256);not null;default:'';comment:项目描述"`
28
+	McpURL      string    `gorm:"column:mcp_url;type:varchar(256);not null;default:'';comment:MCP服务地址"`
29
+	Creator     string    `gorm:"column:creator;type:varchar(32);not null;comment:创建人"`
30
+	CreatedAt   time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间"`
31
+}
32
+
33
+type ProjectDB struct {
34
+	ID          string    `db:"id"`
35
+	ProjectID   string    `db:"project_id"`
36
+	Description string    `db:"description"`
37
+	McpURL      string    `db:"mcp_url"`
38
+	Creator     string    `db:"creator"`
39
+	CreatedAt   time.Time `db:"created_at"`
40
+}
41
+
42
+func (Project) TableName() string {
43
+	return "config_project"
44
+}

+ 48
- 0
internal/tables/config_project_agent.go Zobrazit soubor

@@ -0,0 +1,48 @@
1
+package tables
2
+
3
+import (
4
+	"time"
5
+
6
+	"git.x2erp.com/qdy/go-db/sqldef"
7
+)
8
+
9
+func init() {
10
+	sqldef.AddRegistration(func(r *sqldef.Registry) {
11
+		tb := sqldef.NewTable("config_project_agent", "配置项目Agent表").
12
+			ID("id", 128).NotNull().Comment("主键").End().
13
+			String("agent_id", 128).NotNull().Comment("Agent ID").End().
14
+			String("project_id", 128).NotNull().Comment("项目ID").End().
15
+			String("description", 256).NotNull().Default("''").Comment("描述").End().
16
+			JSON("content").NotNull().Comment("内容 (JSON格式)").End().
17
+			String("creator", 32).NotNull().Comment("创建人").End().
18
+			DateTime("created_at").NotNull().Default("CURRENT_TIMESTAMP").Comment("创建时间").End()
19
+
20
+		tb.AddIndex("idx_agent_id", "agent_id")
21
+		tb.AddIndex("idx_project_id", "project_id")
22
+
23
+		r.RegisterTable(tb.Build())
24
+	})
25
+}
26
+
27
+type ProjectAgent struct {
28
+	AgentID     string    `gorm:"column:agent_id;type:varchar(128);not null;primaryKey;comment:Agent ID"`
29
+	ProjectID   string    `gorm:"column:project_id;type:varchar(128);not null;comment:项目ID"`
30
+	Description string    `gorm:"column:description;type:varchar(256);not null;default:'';comment:描述"`
31
+	Content     string    `gorm:"column:content;type:json;not null;comment:内容 (JSON格式)"`
32
+	Creator     string    `gorm:"column:creator;type:varchar(32);not null;comment:创建人"`
33
+	CreatedAt   time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间"`
34
+}
35
+
36
+type ProjectAgentDB struct {
37
+	ID          string    `db:"id"`
38
+	AgentID     string    `db:"agent_id"`
39
+	ProjectID   string    `db:"project_id"`
40
+	Description string    `db:"description"`
41
+	Content     string    `db:"content"`
42
+	Creator     string    `db:"creator"`
43
+	CreatedAt   time.Time `db:"created_at"`
44
+}
45
+
46
+func (ProjectAgent) TableName() string {
47
+	return "config_project_agent"
48
+}

+ 48
- 0
internal/tables/config_project_skill.go Zobrazit soubor

@@ -0,0 +1,48 @@
1
+package tables
2
+
3
+import (
4
+	"time"
5
+
6
+	"git.x2erp.com/qdy/go-db/sqldef"
7
+)
8
+
9
+func init() {
10
+	sqldef.AddRegistration(func(r *sqldef.Registry) {
11
+		tb := sqldef.NewTable("config_project_skill", "配置项目Skill表").
12
+			ID("id", 128).NotNull().Comment("主键").End().
13
+			String("skill_id", 128).NotNull().Comment("Skill ID").End().
14
+			String("description", 256).NotNull().Default("''").Comment("描述").End().
15
+			JSON("content").NotNull().Comment("Skill内容 (JSON格式)").End().
16
+			String("project_id", 128).NotNull().Comment("项目ID").End().
17
+			String("creator", 32).NotNull().Comment("创建人").End().
18
+			DateTime("created_at").NotNull().Default("CURRENT_TIMESTAMP").Comment("创建时间").End()
19
+
20
+		tb.AddIndex("idx_skill_id", "skill_id")
21
+		tb.AddIndex("idx_project_id", "project_id")
22
+
23
+		r.RegisterTable(tb.Build())
24
+	})
25
+}
26
+
27
+type ProjectSkill struct {
28
+	SkillID     string    `gorm:"column:skill_id;type:varchar(128);not null;primaryKey;comment:Skill ID"`
29
+	Description string    `gorm:"column:description;type:varchar(256);not null;default:'';comment:描述"`
30
+	Content     string    `gorm:"column:content;type:json;not null;comment:Skill内容 (JSON格式)"`
31
+	ProjectID   string    `gorm:"column:project_id;type:varchar(128);not null;comment:项目ID"`
32
+	Creator     string    `gorm:"column:creator;type:varchar(32);not null;comment:创建人"`
33
+	CreatedAt   time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间"`
34
+}
35
+
36
+type ProjectSkillDB struct {
37
+	ID          string    `db:"id"`
38
+	SkillID     string    `db:"skill_id"`
39
+	Description string    `db:"description"`
40
+	Content     string    `db:"content"`
41
+	ProjectID   string    `db:"project_id"`
42
+	Creator     string    `db:"creator"`
43
+	CreatedAt   time.Time `db:"created_at"`
44
+}
45
+
46
+func (ProjectSkill) TableName() string {
47
+	return "config_project_skill"
48
+}

+ 45
- 0
internal/tables/config_role.go Zobrazit soubor

@@ -0,0 +1,45 @@
1
+package tables
2
+
3
+import (
4
+	"time"
5
+
6
+	"git.x2erp.com/qdy/go-db/sqldef"
7
+)
8
+
9
+func init() {
10
+	sqldef.AddRegistration(func(r *sqldef.Registry) {
11
+		tb := sqldef.NewTable("config_role", "配置角色表").
12
+			ID("id", 128).NotNull().Comment("主键").End().
13
+			String("role_id", 128).NotNull().Comment("角色ID").End().
14
+			String("name", 128).NotNull().Default("''").Comment("角色名称").End().
15
+			String("description", 256).NotNull().Default("''").Comment("角色描述").End().
16
+			String("creator", 32).NotNull().Comment("创建人").End().
17
+			DateTime("created_at").NotNull().Default("CURRENT_TIMESTAMP").Comment("创建时间").End()
18
+
19
+		tb.AddIndex("idx_role_id", "role_id")
20
+		tb.AddIndex("idx_name", "name")
21
+
22
+		r.RegisterTable(tb.Build())
23
+	})
24
+}
25
+
26
+type Role struct {
27
+	RoleID      string    `gorm:"column:role_id;type:varchar(128);not null;primaryKey;comment:角色ID"`
28
+	Name        string    `gorm:"column:name;type:varchar(128);not null;default:'';comment:角色名称"`
29
+	Description string    `gorm:"column:description;type:varchar(256);not null;default:'';comment:角色描述"`
30
+	Creator     string    `gorm:"column:creator;type:varchar(32);not null;comment:创建人"`
31
+	CreatedAt   time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间"`
32
+}
33
+
34
+type RoleDB struct {
35
+	ID          string    `db:"id"`
36
+	RoleID      string    `db:"role_id"`
37
+	Name        string    `db:"name"`
38
+	Description string    `db:"description"`
39
+	Creator     string    `db:"creator"`
40
+	CreatedAt   time.Time `db:"created_at"`
41
+}
42
+
43
+func (Role) TableName() string {
44
+	return "config_role"
45
+}

+ 42
- 0
internal/tables/config_tenant.go Zobrazit soubor

@@ -0,0 +1,42 @@
1
+package tables
2
+
3
+import (
4
+	"time"
5
+
6
+	"git.x2erp.com/qdy/go-db/sqldef"
7
+)
8
+
9
+func init() {
10
+	sqldef.AddRegistration(func(r *sqldef.Registry) {
11
+		tb := sqldef.NewTable("config_tenant", "配置租户表").
12
+			ID("id", 128).NotNull().Comment("主键").End().
13
+			String("tenant_id", 128).NotNull().Comment("租户ID").End().
14
+			String("name", 128).NotNull().Default("''").Comment("租户名称").End().
15
+			String("creator", 32).NotNull().Comment("创建人").End().
16
+			DateTime("created_at").NotNull().Default("CURRENT_TIMESTAMP").Comment("创建时间").End()
17
+
18
+		tb.AddIndex("idx_tenant_id", "tenant_id")
19
+		tb.AddIndex("idx_name", "name")
20
+
21
+		r.RegisterTable(tb.Build())
22
+	})
23
+}
24
+
25
+type Tenant struct {
26
+	TenantID  string    `gorm:"column:tenant_id;type:varchar(128);not null;primaryKey;comment:租户ID"`
27
+	Name      string    `gorm:"column:name;type:varchar(128);not null;default:'';comment:租户名称"`
28
+	Creator   string    `gorm:"column:creator;type:varchar(32);not null;comment:创建人"`
29
+	CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间"`
30
+}
31
+
32
+type TenantDB struct {
33
+	ID        string    `db:"id"`
34
+	TenantID  string    `db:"tenant_id"`
35
+	Name      string    `db:"name"`
36
+	Creator   string    `db:"creator"`
37
+	CreatedAt time.Time `db:"created_at"`
38
+}
39
+
40
+func (Tenant) TableName() string {
41
+	return "config_tenant"
42
+}

+ 52
- 0
internal/tables/config_tenant_agent.go Zobrazit soubor

@@ -0,0 +1,52 @@
1
+package tables
2
+
3
+import (
4
+	"time"
5
+
6
+	"git.x2erp.com/qdy/go-db/sqldef"
7
+)
8
+
9
+func init() {
10
+	sqldef.AddRegistration(func(r *sqldef.Registry) {
11
+		tb := sqldef.NewTable("config_tenant_agent", "配置租户Agent表").
12
+			ID("id", 128).NotNull().Comment("主键").End().
13
+			String("agent_id", 128).NotNull().Comment("Agent ID").End().
14
+			String("project_id", 128).NotNull().Comment("项目ID").End().
15
+			String("tenant_id", 128).NotNull().Comment("租户ID").End().
16
+			String("description", 256).NotNull().Default("''").Comment("描述").End().
17
+			JSON("content").NotNull().Comment("内容 (JSON格式)").End().
18
+			String("creator", 32).NotNull().Comment("创建人").End().
19
+			DateTime("created_at").NotNull().Default("CURRENT_TIMESTAMP").Comment("创建时间").End()
20
+
21
+		tb.AddIndex("idx_agent_id", "agent_id")
22
+		tb.AddIndex("idx_tenant_id", "tenant_id")
23
+		tb.AddIndex("idx_project_id", "project_id")
24
+
25
+		r.RegisterTable(tb.Build())
26
+	})
27
+}
28
+
29
+type TenantAgent struct {
30
+	AgentID     string    `gorm:"column:agent_id;type:varchar(128);not null;primaryKey;comment:Agent ID"`
31
+	TenantID    string    `gorm:"column:tenant_id;type:varchar(128);not null;comment:租户ID"`
32
+	ProjectID   string    `gorm:"column:project_id;type:varchar(128);not null;comment:项目ID"`
33
+	Description string    `gorm:"column:description;type:varchar(256);not null;default:'';comment:描述"`
34
+	Content     string    `gorm:"column:content;type:json;not null;comment:内容 (JSON格式)"`
35
+	Creator     string    `gorm:"column:creator;type:varchar(32);not null;comment:创建人"`
36
+	CreatedAt   time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间"`
37
+}
38
+
39
+type TenantAgentDB struct {
40
+	ID          string    `db:"id"`
41
+	AgentID     string    `db:"agent_id"`
42
+	TenantID    string    `db:"tenant_id"`
43
+	ProjectID   string    `db:"project_id"`
44
+	Description string    `db:"description"`
45
+	Content     string    `db:"content"`
46
+	Creator     string    `db:"creator"`
47
+	CreatedAt   time.Time `db:"created_at"`
48
+}
49
+
50
+func (TenantAgent) TableName() string {
51
+	return "config_tenant_agent"
52
+}

+ 52
- 0
internal/tables/config_tenant_skill.go Zobrazit soubor

@@ -0,0 +1,52 @@
1
+package tables
2
+
3
+import (
4
+	"time"
5
+
6
+	"git.x2erp.com/qdy/go-db/sqldef"
7
+)
8
+
9
+func init() {
10
+	sqldef.AddRegistration(func(r *sqldef.Registry) {
11
+		tb := sqldef.NewTable("config_tenant_skill", "配置租户Skill表").
12
+			ID("id", 128).NotNull().Comment("主键").End().
13
+			String("skill_id", 128).NotNull().Comment("Skill ID").End().
14
+			String("project_id", 128).NotNull().Comment("项目ID").End().
15
+			String("tenant_id", 128).NotNull().Comment("租户ID").End().
16
+			String("description", 256).NotNull().Default("''").Comment("描述").End().
17
+			JSON("content").NotNull().Comment("Skill内容 (JSON格式)").End().
18
+			String("creator", 32).NotNull().Comment("创建人").End().
19
+			DateTime("created_at").NotNull().Default("CURRENT_TIMESTAMP").Comment("创建时间").End()
20
+
21
+		tb.AddIndex("idx_skill_id", "skill_id")
22
+		tb.AddIndex("idx_tenant_id", "tenant_id")
23
+		tb.AddIndex("idx_project_id", "project_id")
24
+
25
+		r.RegisterTable(tb.Build())
26
+	})
27
+}
28
+
29
+type TenantSkill struct {
30
+	SkillID     string    `gorm:"column:skill_id;type:varchar(128);not null;primaryKey;comment:Skill ID"`
31
+	TenantID    string    `gorm:"column:tenant_id;type:varchar(128);not null;comment:租户ID"`
32
+	ProjectID   string    `gorm:"column:project_id;type:varchar(128);not null;comment:项目ID"`
33
+	Description string    `gorm:"column:description;type:varchar(256);not null;default:'';comment:描述"`
34
+	Content     string    `gorm:"column:content;type:json;not null;comment:Skill内容 (JSON格式)"`
35
+	Creator     string    `gorm:"column:creator;type:varchar(32);not null;comment:创建人"`
36
+	CreatedAt   time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间"`
37
+}
38
+
39
+type TenantSkillDB struct {
40
+	ID          string    `db:"id"`
41
+	SkillID     string    `db:"skill_id"`
42
+	TenantID    string    `db:"tenant_id"`
43
+	ProjectID   string    `db:"project_id"`
44
+	Description string    `db:"description"`
45
+	Content     string    `db:"content"`
46
+	Creator     string    `db:"creator"`
47
+	CreatedAt   time.Time `db:"created_at"`
48
+}
49
+
50
+func (TenantSkill) TableName() string {
51
+	return "config_tenant_skill"
52
+}

+ 49
- 0
internal/tables/config_user.go Zobrazit soubor

@@ -0,0 +1,49 @@
1
+package tables
2
+
3
+import (
4
+	"time"
5
+
6
+	"git.x2erp.com/qdy/go-db/sqldef"
7
+)
8
+
9
+func init() {
10
+	sqldef.AddRegistration(func(r *sqldef.Registry) {
11
+		tb := sqldef.NewTable("config_user", "配置用户表").
12
+			ID("id", 128).NotNull().Comment("主键").End().
13
+			String("user_id", 128).NotNull().Comment("用户ID").End().
14
+			String("tenant_id", 128).NotNull().Comment("租户ID").End().
15
+			String("name", 128).NotNull().Default("''").Comment("用户名称").End().
16
+			String("mobile", 20).NotNull().Default("''").Comment("移动电话").End().
17
+			String("creator", 32).NotNull().Comment("创建人").End().
18
+			DateTime("created_at").NotNull().Default("CURRENT_TIMESTAMP").Comment("创建时间").End()
19
+
20
+		tb.AddIndex("idx_user_id", "user_id")
21
+		tb.AddIndex("idx_tenant_id", "tenant_id")
22
+		tb.AddIndex("idx_mobile", "mobile")
23
+
24
+		r.RegisterTable(tb.Build())
25
+	})
26
+}
27
+
28
+type User struct {
29
+	UserID    string    `gorm:"column:user_id;type:varchar(128);not null;primaryKey;comment:用户ID"`
30
+	TenantID  string    `gorm:"column:tenant_id;type:varchar(128);not null;comment:租户ID"`
31
+	Name      string    `gorm:"column:name;type:varchar(128);not null;default:'';comment:用户名称"`
32
+	Mobile    string    `gorm:"column:mobile;type:varchar(20);not null;default:'';comment:移动电话"`
33
+	Creator   string    `gorm:"column:creator;type:varchar(32);not null;comment:创建人"`
34
+	CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间"`
35
+}
36
+
37
+type UserDB struct {
38
+	ID        string    `db:"id"`
39
+	UserID    string    `db:"user_id"`
40
+	TenantID  string    `db:"tenant_id"`
41
+	Name      string    `db:"name"`
42
+	Mobile    string    `db:"mobile"`
43
+	Creator   string    `db:"creator"`
44
+	CreatedAt time.Time `db:"created_at"`
45
+}
46
+
47
+func (User) TableName() string {
48
+	return "config_user"
49
+}

+ 42
- 0
internal/tables/config_user_project.go Zobrazit soubor

@@ -0,0 +1,42 @@
1
+package tables
2
+
3
+import (
4
+	"time"
5
+
6
+	"git.x2erp.com/qdy/go-db/sqldef"
7
+)
8
+
9
+func init() {
10
+	sqldef.AddRegistration(func(r *sqldef.Registry) {
11
+		tb := sqldef.NewTable("config_user_project", "配置用户项目关联表").
12
+			ID("id", 128).NotNull().Comment("主键").End().
13
+			String("project_id", 128).NotNull().Comment("项目ID").End().
14
+			String("user_id", 128).NotNull().Comment("用户ID").End().
15
+			String("creator", 32).NotNull().Comment("创建人").End().
16
+			DateTime("created_at").NotNull().Default("CURRENT_TIMESTAMP").Comment("创建时间").End()
17
+
18
+		tb.AddIndex("idx_project_id", "project_id")
19
+		tb.AddIndex("idx_user_id", "user_id")
20
+
21
+		r.RegisterTable(tb.Build())
22
+	})
23
+}
24
+
25
+type UserProject struct {
26
+	ProjectID string    `gorm:"column:project_id;type:varchar(128);not null;primaryKey;comment:项目ID"`
27
+	UserID    string    `gorm:"column:user_id;type:varchar(128);not null;primaryKey;comment:用户ID"`
28
+	Creator   string    `gorm:"column:creator;type:varchar(32);not null;comment:创建人"`
29
+	CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间"`
30
+}
31
+
32
+type UserProjectDB struct {
33
+	ID        string    `db:"id"`
34
+	ProjectID string    `db:"project_id"`
35
+	UserID    string    `db:"user_id"`
36
+	Creator   string    `db:"creator"`
37
+	CreatedAt time.Time `db:"created_at"`
38
+}
39
+
40
+func (UserProject) TableName() string {
41
+	return "config_user_project"
42
+}

+ 42
- 0
internal/tables/config_user_role.go Zobrazit soubor

@@ -0,0 +1,42 @@
1
+package tables
2
+
3
+import (
4
+	"time"
5
+
6
+	"git.x2erp.com/qdy/go-db/sqldef"
7
+)
8
+
9
+func init() {
10
+	sqldef.AddRegistration(func(r *sqldef.Registry) {
11
+		tb := sqldef.NewTable("config_user_role", "配置用户角色关联表").
12
+			ID("id", 128).NotNull().Comment("主键").End().
13
+			String("user_id", 128).NotNull().Comment("用户ID").End().
14
+			String("role_id", 128).NotNull().Comment("角色ID").End().
15
+			String("creator", 32).NotNull().Comment("创建人").End().
16
+			DateTime("created_at").NotNull().Default("CURRENT_TIMESTAMP").Comment("创建时间").End()
17
+
18
+		tb.AddIndex("idx_user_id", "user_id")
19
+		tb.AddIndex("idx_role_id", "role_id")
20
+
21
+		r.RegisterTable(tb.Build())
22
+	})
23
+}
24
+
25
+type UserRole struct {
26
+	UserID    string    `gorm:"column:user_id;type:varchar(128);not null;primaryKey;comment:用户ID"`
27
+	RoleID    string    `gorm:"column:role_id;type:varchar(128);not null;primaryKey;comment:角色ID"`
28
+	Creator   string    `gorm:"column:creator;type:varchar(32);not null;comment:创建人"`
29
+	CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间"`
30
+}
31
+
32
+type UserRoleDB struct {
33
+	ID        string    `db:"id"`
34
+	UserID    string    `db:"user_id"`
35
+	RoleID    string    `db:"role_id"`
36
+	Creator   string    `db:"creator"`
37
+	CreatedAt time.Time `db:"created_at"`
38
+}
39
+
40
+func (UserRole) TableName() string {
41
+	return "config_user_role"
42
+}

+ 2
- 1
test/my_config_token_test.go Zobrazit soubor

@@ -16,7 +16,7 @@ import (
16 16
 // 建立访问配置中心的token
17 17
 func TestCreateConfigToken(t *testing.T) {
18 18
 
19
-	// token := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoic3ZjLW1jcCIsInVzZXJuYW1lIjoiIiwidGVuYW50X2lkIjoiIiwicHJvamVjdF9pZCI6Ing2IiwiaXNzIjoiand0LWFwcCIsInN1YiI6InN2Yy1tY3AiLCJleHAiOjE3NjkzNDg4NTksIm5iZiI6MTc2ODc0NDA1OSwiaWF0IjoxNzY4NzQ0MDU5fQ.llW4J4SZct06jXdjjmGpXKl5UYxYeayS5XOGdmrmh8c"
19
+	// token := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoic3ZjLW1jcCIsInVzZXJuYW1lIjoiIiwidGVuYW50X2lkIjoiIiwicHJvamVjdF9pZCI6Ing2IiwiaXNzIjoiand0LWFwcCIsInN1YiI6InN2Yy1tY3AiLCJleHAiOjE3NjkzNDg4NTksIm5iZiI6MTc2ODc0NDA1OSwiaWF0IjoxNzY4NzQ0MDU5fQ.llW4J4SZct06jXdjjmGpXKl5UYxYeayS5XOGdmrmh8cx"
20 20
 
21 21
 	// c, err := jwt.ParseToken(token, "qwudndgzvxdypdoqd1bhdcdd1qqwzxpoew")
22 22
 	// if err != nil {
@@ -35,6 +35,7 @@ func TestCreateConfigToken(t *testing.T) {
35 35
 	data := configreq.ConfigTokenRequest{
36 36
 		ProjectID:   "x6",
37 37
 		ServiceName: "svc-mcp",
38
+		ExpiresDays: 365,
38 39
 	}
39 40
 	jsonData, err := json.Marshal(data)
40 41
 

Loading…
Zrušit
Uložit