func (s *ServicesService) CreateByURLWithContext(ctx context.Context, svc *Service) (*Service, *http.Response, error) {
	return s.create(ctx, svc, "create_url")
}
CreateByURLWithContext creates a new service by URL
package kongo
import (
	"context"
	"github.com/google/go-querystring/query"
	"github.com/liip/sheriff"
	"net/http"
	"net/url"
	"path"
)
const (
	servicesResourcePath = "/services"
)
type (
	Services interface {
		Create(svc *Service) (*Service, *http.Response, error)
		CreateWithContext(ctx context.Context, svc *Service) (*Service, *http.Response, error)
		CreateByURL(svc *Service) (*Service, *http.Response, error)
		CreateByURLWithContext(ctx context.Context, svc *Service) (*Service, *http.Response, error)
		Delete(idOrName string) (*http.Response, error)
		DeleteWithContext(ctx context.Context, idOrName string) (*http.Response, error)
		Get(idOrName string) (*Service, *http.Response, error)
		GetWithContext(ctx context.Context, idOrName string) (*Service, *http.Response, error)
		List(options *ListServicesOptions) ([]*Service, *http.Response, error)
		ListWithContext(ctx context.Context, options *ListServicesOptions) ([]*Service, *http.Response, error)
		Update(idOrName string, svc *Service) (*Service, *http.Response, error)
		UpdateWithContext(ctx context.Context, idOrName string, svc *Service) (*Service, *http.Response, error)
		UpdateByURL(idOrName string, svc *Service) (*Service, *http.Response, error)
		UpdateByURLWithContext(ctx context.Context, idOrName string, svc *Service) (*Service, *http.Response, error)
	}
	ServicesService struct {
		client *Kongo
	}
	Service struct {
		ConnectTimeout int64 `json:"connect_timeout,omitempty" groups:"create,update"`
		CreatedAt Time `json:"created_at"`
		Host string `json:"host" groups:"create,update"`
		Id string `json:"id"`
		Name string `json:"name" groups:"create,create_url,update,update_url"`
		Path string `json:"path,omitempty" groups:"create,update"`
		Port int `json:"port,omitempty" groups:"create,update"`
		Protocol string `json:"protocol" groups:"create,update"`
		ReadTimeout int `json:"read_timeout,omitempty" groups:"create,update"`
		Retries int `json:"retries,omitempty" groups:"create,update"`
		UpdatedAt Time `json:"updated_at"`
		URL string `json:"url,omitempty" groups:"create_url,update_url"`
		WriteTimeout int `json:"write_timeout,omitempty" groups:"create,update"`
	}
	ServicesRoot struct {
		Services []*Service `json:"data"`
	}
	ListServicesOptions struct {
		Offset string `url:"offset, omitempty"`
		Size int `url:"size, omitempty"`
	}
)
func (s *ServicesService) create(ctx context.Context, svc *Service, groupName string) (*Service, *http.Response, error) {
	resource, _ := url.Parse(servicesResourcePath)
	opts := &sheriff.Options{Groups: []string{groupName}}
	body, err := sheriff.Marshal(opts, svc)
	if err != nil {
		return nil, nil, err
	}
	req, err := s.client.NewRequest(ctx, http.MethodPost, resource, body)
	if err != nil {
		return nil, nil, err
	}
	root := new(Service)
	res, err := s.client.Do(req, root)
	if err != nil {
		return nil, res, err
	}
	return root, res, nil
}
func (s *ServicesService) CreateWithContext(ctx context.Context, svc *Service) (*Service, *http.Response, error) {
	return s.create(ctx, svc, "create")
}
func (s *ServicesService) Create(svc *Service) (*Service, *http.Response, error) {
	return s.CreateWithContext(context.TODO(), svc)
}