Skip to content

Commit

Permalink
Merge pull request aiven#92 from aiven/ivans-extend-user-endpoint
Browse files Browse the repository at this point in the history
add service user Redis ACL fields

aiven#92
  • Loading branch information
rikonen authored Nov 27, 2020
2 parents fce96a1 + 3b82910 commit ac51155
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions service_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ import (
type (
// ServiceUser is the representation of a Service User in the Aiven API.
ServiceUser struct {
Username string `json:"username"`
Password string `json:"password"`
Type string `json:"type"`
AccessCert string `json:"access_cert"`
AccessKey string `json:"access_key"`
Username string `json:"username"`
Password string `json:"password"`
Type string `json:"type"`
AccessCert string `json:"access_cert"`
AccessKey string `json:"access_key"`
AccessCertNotValidAfterTime string `json:"access_cert_not_valid_after_time"`
AccessControl AccessControl `json:"access_control,omitempty"`
}

AccessControl struct {
RedisACLCategories []string `json:"redis_acl_categories"`
RedisACLCommands []string `json:"redis_acl_commands"`
RedisACLKeys []string `json:"redis_acl_keys"`
}

// ServiceUsersHandler is the client that interacts with the ServiceUsers
Expand All @@ -27,7 +35,8 @@ type (
// CreateServiceUserRequest are the parameters required to create a
// ServiceUser.
CreateServiceUserRequest struct {
Username string `json:"username"`
Username string `json:"username"`
AccessControl AccessControl `json:"access_control,omitempty"`
}

// ModifyServiceUserRequest params required to modify a ServiceUser
Expand Down

0 comments on commit ac51155

Please sign in to comment.