github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/dms/v2/topics/results.go (about) 1 package topics 2 3 // CreateResponse is a struct that contains the create response 4 type CreateResponse struct { 5 Name string `json:"name"` 6 } 7 8 // Topic includes the parameters of an topic 9 // REDO this part 10 type Topic struct { 11 Name string `json:"name"` 12 Partition int `json:"partition"` 13 Replication int `json:"replication"` 14 RetentionTime int `json:"retention_time"` 15 SyncReplication bool `json:"sync_replication"` 16 SyncMessageFlush bool `json:"sync_message_flush"` 17 TopicType int `json:"topic_type"` 18 PoliciesOnly bool `json:"policiesOnly"` 19 ExternalConfigs interface{} `json:"external_configs"` 20 } 21 22 // ListResponse is a struct that contains the list response 23 type ListResponse struct { 24 Total int `json:"total"` 25 Size int `json:"size"` 26 RemainPartitions int `json:"remain_partitions"` 27 MaxPartitions int `json:"max_partitions"` 28 Topics []Topic `json:"topics"` 29 } 30 31 // TopicDetail includes the detail parameters of an topic 32 type TopicDetail struct { 33 Name string `json:"topic"` 34 Partitions []Partition `json:"partitions"` 35 GroupSubscribed []string `json:"group_subscribed"` 36 } 37 38 // Partition represents the details of a partition 39 type Partition struct { 40 Partition int `json:"partition"` 41 Replicas []Replica `json:"replicas"` 42 // Node ID 43 Leader int `json:"leader"` 44 // Log End Offset 45 Leo int `json:"leo"` 46 // High Watermark 47 Hw int `json:"hw"` 48 // Log Start Offset 49 Lso int `json:"lso"` 50 // time stamp 51 UpdateTimestamp int64 `json:"last_update_timestamp"` 52 } 53 54 // Replica represents the details of a replica 55 type Replica struct { 56 Broker int `json:"broker"` 57 Leader bool `json:"leader"` 58 InSync bool `json:"in_sync"` 59 Size int `json:"size"` 60 Lag int `json:"lag"` 61 } 62 63 // DeleteResponse is a struct that contains the deletion response 64 type DeleteResponse struct { 65 Name string `json:"id"` 66 Success bool `json:"success"` 67 }