func (svc *SQS) ListAllQueues() ([]string, error) {
	return svc.ListQueues("")
}
ListQueues gets all of SQS queue list.
package sqs
import (
	"strings"
	"sync"
	"github.com/aws/aws-sdk-go/aws/session"
	SDK "github.com/aws/aws-sdk-go/service/sqs"
	"github.com/evalphobia/aws-sdk-go-wrapper/config"
	"github.com/evalphobia/aws-sdk-go-wrapper/log"
	"github.com/evalphobia/aws-sdk-go-wrapper/private/errors"
	"github.com/evalphobia/aws-sdk-go-wrapper/private/pointers"
)
const (
	serviceName = "SQS"
)
type SQS struct {
	client *SDK.SQS
	logger log.Logger
	prefix string
	queuesMu sync.RWMutex
	queues   map[string]*Queue
}
func New(conf config.Config) (*SQS, error) {
	sess, err := conf.Session()
	if err != nil {
		return nil, err
	}
	svc := NewFromSession(sess)
	svc.prefix = conf.DefaultPrefix
	return svc, nil
}
func NewFromSession(sess *session.Session) *SQS {
	return &SQS{
		client: SDK.New(sess),
		logger: log.DefaultLogger,
		queues: make(map[string]*Queue),
	}
}
func (svc *SQS) GetClient() *SDK.SQS {
	return svc.client
}
func (svc *SQS) SetLogger(logger log.Logger) {
	svc.logger = logger
}
func (svc *SQS) SetPrefix(prefix string) {
	svc.prefix = prefix
}
func (svc *SQS) GetQueue(name string) (*Queue, error) {
	queueName := svc.prefix + name
	svc.queuesMu.RLock()
	q, ok := svc.queues[queueName]
	svc.queuesMu.RUnlock()
	if ok {
		return q, nil
	}
	url, err := svc.client.GetQueueUrl(&SDK.GetQueueUrlInput{
		QueueName:              pointers.String(queueName),
		QueueOwnerAWSAccountId: nil,
	})
	if err != nil {
		svc.Errorf("error on `GetQueueURL` operation; queue=%s; error=%s;", queueName, err.Error())
		return nil, err
	}
	q = NewQueue(svc, name, *url.QueueUrl)
	svc.queuesMu.Lock()
	svc.queues[queueName] = q
	svc.queuesMu.Unlock()
	return q, nil
}