70 lines
2.6 KiB
Go
70 lines
2.6 KiB
Go
package policyconfig
|
|
|
|
import "encoding/json"
|
|
|
|
type templateRequest struct {
|
|
TemplateCode string `json:"template_code"`
|
|
TemplateVersion string `json:"template_version"`
|
|
Name string `json:"name"`
|
|
Status string `json:"status"`
|
|
RuleJSON json.RawMessage `json:"rule_json"`
|
|
Description string `json:"description"`
|
|
}
|
|
|
|
type instanceRequest struct {
|
|
InstanceCode string `json:"instance_code"`
|
|
TemplateCode string `json:"template_code"`
|
|
TemplateVersion string `json:"template_version"`
|
|
RegionScope string `json:"region_scope"`
|
|
Status string `json:"status"`
|
|
EffectiveFromMS int64 `json:"effective_from_ms"`
|
|
EffectiveToMS int64 `json:"effective_to_ms"`
|
|
}
|
|
|
|
type statusRequest struct {
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type templateDTO struct {
|
|
TemplateID uint64 `json:"template_id"`
|
|
VersionID uint64 `json:"version_id"`
|
|
TemplateCode string `json:"template_code"`
|
|
TemplateVersion string `json:"template_version"`
|
|
Name string `json:"name"`
|
|
Status string `json:"status"`
|
|
RuleJSON json.RawMessage `json:"rule_json"`
|
|
Description string `json:"description"`
|
|
CreatedAtMS int64 `json:"created_at_ms"`
|
|
UpdatedAtMS int64 `json:"updated_at_ms"`
|
|
}
|
|
|
|
type instanceDTO struct {
|
|
InstanceID uint64 `json:"instance_id"`
|
|
AppCode string `json:"app_code"`
|
|
InstanceCode string `json:"instance_code"`
|
|
TemplateCode string `json:"template_code"`
|
|
TemplateVersion string `json:"template_version"`
|
|
RegionScope string `json:"region_scope"`
|
|
Status string `json:"status"`
|
|
EffectiveFromMS int64 `json:"effective_from_ms"`
|
|
EffectiveToMS int64 `json:"effective_to_ms"`
|
|
PublishStatus string `json:"publish_status"`
|
|
PublishError string `json:"publish_error"`
|
|
LastPublishedAtMS int64 `json:"last_published_at_ms"`
|
|
CreatedAtMS int64 `json:"created_at_ms"`
|
|
UpdatedAtMS int64 `json:"updated_at_ms"`
|
|
}
|
|
|
|
type publishDTO struct {
|
|
JobID uint64 `json:"job_id"`
|
|
InstanceID uint64 `json:"instance_id"`
|
|
AppCode string `json:"app_code"`
|
|
InstanceCode string `json:"instance_code"`
|
|
TemplateCode string `json:"template_code"`
|
|
TemplateVersion string `json:"template_version"`
|
|
Status string `json:"status"`
|
|
TargetCount int `json:"target_count"`
|
|
PublishedRegionID []int64 `json:"published_region_ids"`
|
|
PublishedAtMS int64 `json:"published_at_ms"`
|
|
}
|