Permalink
Browse files

Exported queue.Name

  • Loading branch information...
1 parent 8f768a6 commit 120fe53a6bcf87fbc23f7ed0caef026febbcb73b @treeder treeder committed Feb 29, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 ironmq.go
View
10 ironmq.go
@@ -79,7 +79,7 @@ func (c *Client) req(method, endpoint string, body []byte, data interface{}) err
// Queue represents an IronMQ queue.
type Queue struct {
- name string
+ Name string
Client *Client
}
@@ -97,7 +97,7 @@ type QueueInfo struct {
// Info retrieves a QueueInfo structure for the queue.
func (q *Queue) Info() (*QueueInfo, error) {
var qi QueueInfo
- err := q.Client.req("GET", "queues/"+q.name, nil, &qi)
+ err := q.Client.req("GET", "queues/"+q.Name, nil, &qi)
if err != nil {
return nil, err
}
@@ -110,7 +110,7 @@ func (q *Queue) Get() (*Message, error) {
var resp struct {
Msgs []*Message `json:"messages"`
}
- err := q.Client.req("GET", "queues/"+q.name+"/messages", nil, &resp)
+ err := q.Client.req("GET", "queues/"+q.Name+"/messages", nil, &resp)
if err != nil {
return nil, err
}
@@ -144,7 +144,7 @@ func (q *Queue) PushMsg(msg *Message) (id string, err error) {
var resp struct {
IDs []string `json:"ids"`
}
- err = q.Client.req("POST", "queues/"+q.name+"/messages", data, &resp)
+ err = q.Client.req("POST", "queues/"+q.Name+"/messages", data, &resp)
if err != nil {
return "", err
}
@@ -164,5 +164,5 @@ type Message struct {
}
func (m *Message) Delete() error {
- return m.q.Client.req("DELETE", "queues/"+m.q.name+"/messages/"+m.Id, nil, nil)
+ return m.q.Client.req("DELETE", "queues/"+m.q.Name+"/messages/"+m.Id, nil, nil)
}

0 comments on commit 120fe53

Please sign in to comment.