diff options
Diffstat (limited to 'src/dma/vendor/github.com/streadway/amqp/uri.go')
-rw-r--r-- | src/dma/vendor/github.com/streadway/amqp/uri.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dma/vendor/github.com/streadway/amqp/uri.go b/src/dma/vendor/github.com/streadway/amqp/uri.go index 35fefdc2..e5847154 100644 --- a/src/dma/vendor/github.com/streadway/amqp/uri.go +++ b/src/dma/vendor/github.com/streadway/amqp/uri.go @@ -125,6 +125,15 @@ func (uri URI) PlainAuth() *PlainAuth { } } +// AMQPlainAuth returns a PlainAuth structure based on the parsed URI's +// Username and Password fields. +func (uri URI) AMQPlainAuth() *AMQPlainAuth { + return &AMQPlainAuth{ + Username: uri.Username, + Password: uri.Password, + } +} + func (uri URI) String() string { authority, err := url.Parse("") if err != nil { |