-
Notifications
You must be signed in to change notification settings - Fork 3
/
model.go
48 lines (38 loc) · 1.29 KB
/
model.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
package redis_rules
import "github.com/RedisLabs/rediscloud-go-api/internal"
// Read
type ListRedisRulesResponse struct {
AccountId *int `json:"accountId,omitempty"`
RedisRules []*GetRedisRuleResponse `json:"redisRules,omitempty"`
}
func (o ListRedisRulesResponse) String() string {
return internal.ToString(o)
}
type GetRedisRuleResponse struct {
ID *int `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
ACL *string `json:"acl,omitempty"`
IsDefault *bool `json:"isDefault,omitempty"`
Status *string `json:"status,omitempty"`
}
func (o GetRedisRuleResponse) String() string {
return internal.ToString(o)
}
// Create + Update
type CreateRedisRuleRequest struct {
Name *string `json:"name,omitempty"`
RedisRule *string `json:"redisRule,omitempty"`
}
func (o CreateRedisRuleRequest) String() string {
return internal.ToString(o)
}
const (
// StatusActive is the active value of the `Status` field in `RedisRule`
StatusActive = "active"
// StatusPending is the pending value of the `Status` field in `RedisRule`
StatusPending = "pending"
// StatusError is the error value of the `Status` field in `RedisRule`
StatusError = "error"
// StatusDeleting is the deleting value of the `Status` field in `RedisRule`
StatusDeleting = "deleting"
)