func (s *datastoreManagementService) SetupWithUconSwagger(swPlugin *swagger.Plugin) {
	tag := swPlugin.AddTag(&swagger.Tag{Name: "DatastoreManagement", Description: ""})
	info := swagger.NewHandlerInfo(s.HandlePostTQ)
	ucon.Handle("DELETE", s.APIDeleteBackupsURL, info)
	info.Description, info.Tags = "Remove old Datastore backups", []string{tag.Name}
	ucon.HandleFunc("GET,DELETE", s.DeleteOldBackupURL, s.HandlePostDeleteList)
	ucon.HandleFunc("GET,DELETE", s.DeleteUnitOfBackupURL, s.HandleDeleteAEBackupInformation)
}
SetupWithUconSwagger setup handlers to ucon mux.
package ds2bq
import (
	"context"
	"net/http"
	"time"
	"github.com/favclip/ucon"
	"github.com/favclip/ucon/swagger"
	"google.golang.org/appengine/taskqueue"
)
type ManagementOption interface {
	implements(s *datastoreManagementService)
}
type managementURLOption struct {
	APIDeleteBackupsURL   string
	DeleteOldBackupURL    string
	DeleteUnitOfBackupURL string
}
func (o *managementURLOption) implements(s *datastoreManagementService) {
	if v := o.APIDeleteBackupsURL; v != "" {
		s.APIDeleteBackupsURL = v
	}
	if v := o.DeleteOldBackupURL; v != "" {
		s.DeleteOldBackupURL = v
	}
	if v := o.DeleteUnitOfBackupURL; v != "" {
		s.DeleteUnitOfBackupURL = v
	}
}
func ManagementWithURLs(apiDeleteBackupURL, deleteOldBackupURL, deleteUnitOfBackupURL string) ManagementOption {
	return &managementURLOption{
		APIDeleteBackupsURL:   apiDeleteBackupURL,
		DeleteOldBackupURL:    deleteOldBackupURL,
		DeleteUnitOfBackupURL: deleteUnitOfBackupURL,
	}
}
type managementQueueNameOption struct {
	QueueName string
}
func (o *managementQueueNameOption) implements(s *datastoreManagementService) {
	s.QueueName = o.QueueName
}
func ManagementWithQueueName(queueName string) ManagementOption {
	return &managementQueueNameOption{
		QueueName: queueName,
	}
}
type managementExpireDurationOption struct {
	ExpireAfter time.Duration
}
func (o *managementExpireDurationOption) implements(s *datastoreManagementService) {
	s.ExpireAfter = o.ExpireAfter
}
func ManagementWithExpireDuration(expireAfter time.Duration) ManagementOption {
	return &managementExpireDurationOption{
		ExpireAfter: expireAfter,
	}
}
type datastoreManagementService struct {
	QueueName   string
	ExpireAfter time.Duration
	APIDeleteBackupsURL   string
	DeleteOldBackupURL    string
	DeleteUnitOfBackupURL string
}
type DatastoreManagementService interface {
	SetupWithUconSwagger(swPlugin *swagger.Plugin)
	HandlePostTQ(c context.Context, req *Noop) (*Noop, error)
	HandlePostDeleteList(c context.Context, r *http.Request, req *ReqListBase) (*Noop, error)
	HandleDeleteAEBackupInformation(c context.Context, r *http.Request, req *AEBackupInformationDeleteReq) (*Noop, error)
}
func NewDatastoreManagementService(opts ...ManagementOption) DatastoreManagementService {
	s := &datastoreManagementService{
		QueueName:             "exec-rm-old-datastore-backups",
		ExpireAfter:           30 * 24 * time.Hour,
		APIDeleteBackupsURL:   "/api/datastore-management/delete-old-backups",
		DeleteOldBackupURL:    "/tq/datastore-management/delete-old-backups",
		DeleteUnitOfBackupURL: "/tq/datastore-management/delete-backup",
	}
	for _, opt := range opts {
		opt.implements(s)
	}
	return s
}