code: func getParameterAsInt64(parameters map[string]interface{}, name string, defaultt int64, min int64, max int64) (int64, error) {
  	rv := defaultt
  	param := parameters[name]
  	switch v := param.(type) {
  	case string:
  		vv, err := strconv.ParseInt(v, 0, 64)
  		if err != nil {
  			return 0, fmt.Errorf("%s parameter must be an integer, %v invalid", name, param)
  		}
  		rv = vv
  	case int64:
  		rv = v
  	case int, uint, int32, uint32, uint64:
  		rv = reflect.ValueOf(v).Convert(reflect.TypeOf(rv)).Int()
  	case nil:
  		// do nothing
  	default:
  		return 0, fmt.Errorf("invalid value for %s: %#v", name, param)
  	}
  
  	if rv < min || rv > max {
  		return 0, fmt.Errorf("the %s %#v parameter should be a number between %d and %d (inclusive)", name, rv, min, max)
  	}
  
  	return rv, nil
  }
docs: // getParameterAsInt64 converts paramaters[name] to an int64 value (using
  // defaultt if nil), verifies it is no smaller than min, and returns it.