Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be able to specify password_hash when creating a new user #119

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions exchanges.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ type ExchangeInfo struct {
type ExchangeSettings struct {
Type string `json:"type"`
Durable bool `json:"durable"`
AutoDelete bool `json:"auto_delete"`
Arguments map[string]interface{} `json:"arguments"`
AutoDelete bool `json:"auto_delete,omitempty"`
Arguments map[string]interface{} `json:"arguments,omitempty"`
}

func (c *Client) ListExchanges() (rec []ExchangeInfo, err error) {
Expand Down
5 changes: 3 additions & 2 deletions queues.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,10 @@ func (c *Client) GetQueueWithParameters(vhost, queue string, qs url.Values) (rec
//

type QueueSettings struct {
Type string `json:"type"`
Durable bool `json:"durable"`
AutoDelete bool `json:"auto_delete"`
Arguments map[string]interface{} `json:"arguments"`
AutoDelete bool `json:"auto_delete,omitempty"`
Arguments map[string]interface{} `json:"arguments,omitempty"`
}

func (c *Client) DeclareQueue(vhost, queue string, info QueueSettings) (res *http.Response, err error) {
Expand Down
3 changes: 2 additions & 1 deletion users.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ type UserSettings struct {

// *never* returned by RabbitMQ. Set by the client
// to create/update a user. MK.
Password string `json:"password"`
Password string `json:"password,omitempty"`
PasswordHash string `json:"password_hash,omitempty"`
}

//
Expand Down