/
request.go
50 lines (46 loc) · 1.88 KB
/
request.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package systemconfig
import "github.com/elliotxx/go-web-template/pkg/handler"
// CreateSystemConfigRequest represents the create request structure for
// configuration of a system.
type CreateSystemConfigRequest struct {
// Tenant or organization that the system belongs to
Tenant string `json:"tenant" binding:"required"`
// Environment where the system is deployed (e.g. prod, gray)
Env string `json:"env" binding:"required"`
// Type or category of the system (e.g. cache, message queue)
Type string `json:"type" binding:"required"`
// Configuration data in JSON or YAML format
Config string `json:"config" binding:"required"`
// Description or purpose of the system
Description string `json:"description"`
// Username or ID of the user who created the system
Creator string `json:"creator" binding:"required"`
// Username or ID of the user who last modified the system
Modifier string `json:"modifier"`
}
// UpdateSystemConfigRequest represents the update request structure for
// configuration of a system.
type UpdateSystemConfigRequest struct {
// Unique ID of the system
ID uint `json:"id" binding:"required"`
// Tenant or organization that the system belongs to
Tenant string `json:"tenant"`
// Environment where the system is deployed (e.g. prod, gray)
Env string `json:"env"`
// Type or category of the system (e.g. cache, message queue)
Type string `json:"type"`
// Configuration data in JSON or YAML format
Config string `json:"config"`
// Description or purpose of the system
Description string `json:"description"`
// Username or ID of the user who created the system
Creator string `json:"creator"`
// Username or ID of the user who last modified the system
Modifier string `json:"modifier"`
}
// QuerySystemConfigRequest represents the query request structure for
// configuration of a system.
type QuerySystemConfigRequest struct {
handler.Pagination
handler.Search
}